Grammar: Add terminating semicolons (KT-22676)

This commit is contained in:
Alexey Belkov
2018-02-03 22:17:00 +03:00
committed by Sergey Igushkin
parent 6fa87f98ca
commit 3cb952df5d
4 changed files with 21 additions and 9 deletions
+1
View File
@@ -109,6 +109,7 @@ parameter
object
: "object" SimpleName primaryConstructor? (":" delegationSpecifier{","})? classBody?
;
secondaryConstructor
: modifiers "constructor" valueParameters (":" constructorDelegationCall)? block
+1
View File
@@ -230,6 +230,7 @@ callSuffix
annotatedLambda
: ("@" unescapedAnnotation)* labelDefinition? functionLiteral
;
memberAccessOperation
: "." : "?." : "?"
+19 -8
View File
@@ -4,7 +4,8 @@
[helper]
Digit
: ["0".."9"];
: ["0".."9"]
;
IntegerLiteral
: Digit
@@ -12,11 +13,13 @@ IntegerLiteral
;
FloatLiteral
: <Java double literal>;
: <Java double literal>
;
[helper]
HexDigit
: Digit | ["A".."F", "a".."f"];
: Digit | ["A".."F", "a".."f"]
;
HexadecimalLiteral
: "0x" HexDigit
@@ -24,37 +27,44 @@ HexadecimalLiteral
;
CharacterLiteral
: <character as in Java>;
: <character as in Java>
;
/**
See [Basic types](basic-types.html)
*/
NoEscapeString
: <"""-quoted string>;
: <"""-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)
*/
SEMI
: <semicolon or newline>;
: <semicolon or newline>
;
SimpleName
: <java identifier>
@@ -66,7 +76,8 @@ See [Java interoperability](java-interop.html)
*/
LabelName
: "@" SimpleName;
: "@" SimpleName
;
/**
See [Returns and jumps](returns.html)
-1
View File
@@ -4,7 +4,6 @@
Relevant pages: [Packages](packages.html)
*/
[start]
kotlinFile
: preamble topLevelObject*