Merge pull request #604 from JetBrains/rr/yole/kt7049
add some missing elements to Kotlin grammar
This commit is contained in:
@@ -725,7 +725,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
|
||||
/*
|
||||
* literalConstant
|
||||
* : "true" | "false"
|
||||
* : StringWithTemplates
|
||||
* : stringTemplate
|
||||
* : NoEscapeString
|
||||
* : IntegerLiteral
|
||||
* : LongLiteral
|
||||
|
||||
@@ -148,7 +148,7 @@ stringTemplate
|
||||
|
||||
stringTemplateElement
|
||||
: RegularStringPart
|
||||
: ShortTemplateEntrySTART (SimpleName | "this")
|
||||
: ShortTemplateEntryStart (SimpleName | "this")
|
||||
: EscapeSequence
|
||||
: longTemplate
|
||||
;
|
||||
|
||||
+18
-4
@@ -10,7 +10,7 @@ IntegerLiteral
|
||||
: Digit+?
|
||||
|
||||
FloatLiteral
|
||||
: <java double literal>;
|
||||
: <Java double literal>;
|
||||
|
||||
[helper]
|
||||
HexDigit
|
||||
@@ -26,12 +26,24 @@ CharacterLiteral
|
||||
See [Basic types](basic-types.html)
|
||||
*/
|
||||
|
||||
StringWithTemplates
|
||||
: <single-quoted string, $ can be escaped>;
|
||||
|
||||
NoEscapeString
|
||||
: <"""-quoted string>;
|
||||
|
||||
RegularStringPart
|
||||
: <any character other than backslash, quote, $ or newline>
|
||||
|
||||
ShortTemplateEntryStart:
|
||||
: "$"
|
||||
|
||||
EscapeSequence:
|
||||
: UnicodeEscapeSequence | RegularEscapeSequence
|
||||
|
||||
UnicodeEscapeSequence:
|
||||
: "\u" HexDigit{4}
|
||||
|
||||
RegularEscapeSequence:
|
||||
: "\" <any character other than newline>
|
||||
|
||||
/**
|
||||
See [String templates](basic-types.html#templates)
|
||||
*/
|
||||
@@ -52,7 +64,9 @@ See [Java interoperability](java-interop.html)
|
||||
FieldName
|
||||
: "$" SimpleName;
|
||||
|
||||
/*
|
||||
See [Properties And Fields](properties.html)
|
||||
*/
|
||||
|
||||
LabelName
|
||||
: "@" SimpleName;
|
||||
|
||||
Reference in New Issue
Block a user