1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 17:05:33 +03:00

Zero-argument methods include the expressions directly.

This commit is contained in:
Rob Rix 2016-08-15 13:58:23 -04:00
parent eb1ad9fbbf
commit 6792cfe1f9

View File

@ -119,9 +119,8 @@ termConstructor source sourceSpan info = cofree . construct
construct children | Method == category info = case children of
[identifier, params, exprs] |
Params == category (extract params),
S.Indexed params' <- unwrap params,
exprs' <- expressionStatements exprs ->
withDefaultInfo $ S.Method identifier params' exprs'
S.Indexed params' <- unwrap params ->
withDefaultInfo $ S.Method identifier params' (toList (unwrap exprs))
[identifier, exprs] ->
withDefaultInfo $ S.Method identifier mempty (toList (unwrap exprs))
_ ->