Change parsing of annotations on block level expressions

Attach annotations to the closest prefix expression instead of
whole statement if no new line found after annotations

The motivation is for a simple annotated expression like '@ann x + y'
its syntax form must not change after prepending 'val z = ' just before it
This commit is contained in:
Denis Zharkov
2016-10-06 16:22:12 +03:00
parent 9ff439e39e
commit bec84b1d7b
13 changed files with 745 additions and 91 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ statement
;
blockLevelExpression
: annotations expression
: annotations ("\n")+ expression
;
multiplicativeOperation