KT-847 Allow "this" without {} in string templates

This commit is contained in:
Andrey Breslav
2011-12-15 20:54:30 +04:00
committed by Nikolay Krasko
parent 94ad86e79e
commit 55c11d0f44
9 changed files with 476 additions and 393 deletions
+17 -1
View File
@@ -134,7 +134,7 @@ label
literalConstant
: "true" | "false"
: StringWithTemplates
: stringTemplate
: NoEscapeString
: IntegerLiteral
: HexadecimalLiteral
@@ -143,6 +143,22 @@ literalConstant
: "null"
;
stringTemplate
: "\"" stringTemplateElement* "\""
;
stringTemplateElement
: RegularStringPart
: ShortTemplateEntrySTART (SimpleName | "this")
: EscapeSequence
: longTemplate
;
longTemplate
: "${" expression "}"
;
isRHS
: pattern
;