Grammar: Add terminating semicolons (KT-22676)
This commit is contained in:
committed by
Sergey Igushkin
parent
6fa87f98ca
commit
3cb952df5d
@@ -109,6 +109,7 @@ parameter
|
||||
|
||||
object
|
||||
: "object" SimpleName primaryConstructor? (":" delegationSpecifier{","})? classBody?
|
||||
;
|
||||
|
||||
secondaryConstructor
|
||||
: modifiers "constructor" valueParameters (":" constructorDelegationCall)? block
|
||||
|
||||
@@ -230,6 +230,7 @@ callSuffix
|
||||
|
||||
annotatedLambda
|
||||
: ("@" unescapedAnnotation)* labelDefinition? functionLiteral
|
||||
;
|
||||
|
||||
memberAccessOperation
|
||||
: "." : "?." : "?"
|
||||
|
||||
+19
-8
@@ -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)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
Relevant pages: [Packages](packages.html)
|
||||
*/
|
||||
|
||||
|
||||
[start]
|
||||
kotlinFile
|
||||
: preamble topLevelObject*
|
||||
|
||||
Reference in New Issue
Block a user