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
|
||||||
: "object" SimpleName primaryConstructor? (":" delegationSpecifier{","})? classBody?
|
: "object" SimpleName primaryConstructor? (":" delegationSpecifier{","})? classBody?
|
||||||
|
;
|
||||||
|
|
||||||
secondaryConstructor
|
secondaryConstructor
|
||||||
: modifiers "constructor" valueParameters (":" constructorDelegationCall)? block
|
: modifiers "constructor" valueParameters (":" constructorDelegationCall)? block
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ callSuffix
|
|||||||
|
|
||||||
annotatedLambda
|
annotatedLambda
|
||||||
: ("@" unescapedAnnotation)* labelDefinition? functionLiteral
|
: ("@" unescapedAnnotation)* labelDefinition? functionLiteral
|
||||||
|
;
|
||||||
|
|
||||||
memberAccessOperation
|
memberAccessOperation
|
||||||
: "." : "?." : "?"
|
: "." : "?." : "?"
|
||||||
|
|||||||
+19
-8
@@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
[helper]
|
[helper]
|
||||||
Digit
|
Digit
|
||||||
: ["0".."9"];
|
: ["0".."9"]
|
||||||
|
;
|
||||||
|
|
||||||
IntegerLiteral
|
IntegerLiteral
|
||||||
: Digit
|
: Digit
|
||||||
@@ -12,11 +13,13 @@ IntegerLiteral
|
|||||||
;
|
;
|
||||||
|
|
||||||
FloatLiteral
|
FloatLiteral
|
||||||
: <Java double literal>;
|
: <Java double literal>
|
||||||
|
;
|
||||||
|
|
||||||
[helper]
|
[helper]
|
||||||
HexDigit
|
HexDigit
|
||||||
: Digit | ["A".."F", "a".."f"];
|
: Digit | ["A".."F", "a".."f"]
|
||||||
|
;
|
||||||
|
|
||||||
HexadecimalLiteral
|
HexadecimalLiteral
|
||||||
: "0x" HexDigit
|
: "0x" HexDigit
|
||||||
@@ -24,37 +27,44 @@ HexadecimalLiteral
|
|||||||
;
|
;
|
||||||
|
|
||||||
CharacterLiteral
|
CharacterLiteral
|
||||||
: <character as in Java>;
|
: <character as in Java>
|
||||||
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See [Basic types](basic-types.html)
|
See [Basic types](basic-types.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NoEscapeString
|
NoEscapeString
|
||||||
: <"""-quoted string>;
|
: <"""-quoted string>
|
||||||
|
;
|
||||||
|
|
||||||
RegularStringPart
|
RegularStringPart
|
||||||
: <any character other than backslash, quote, $ or newline>
|
: <any character other than backslash, quote, $ or newline>
|
||||||
|
;
|
||||||
|
|
||||||
ShortTemplateEntryStart
|
ShortTemplateEntryStart
|
||||||
: "$"
|
: "$"
|
||||||
|
;
|
||||||
|
|
||||||
EscapeSequence
|
EscapeSequence
|
||||||
: UnicodeEscapeSequence | RegularEscapeSequence
|
: UnicodeEscapeSequence | RegularEscapeSequence
|
||||||
|
;
|
||||||
|
|
||||||
UnicodeEscapeSequence
|
UnicodeEscapeSequence
|
||||||
: "\u" HexDigit{4}
|
: "\u" HexDigit{4}
|
||||||
|
;
|
||||||
|
|
||||||
RegularEscapeSequence
|
RegularEscapeSequence
|
||||||
: "\" <any character other than newline>
|
: "\" <any character other than newline>
|
||||||
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See [String templates](basic-types.html#templates)
|
See [String templates](basic-types.html#templates)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SEMI
|
SEMI
|
||||||
: <semicolon or newline>;
|
: <semicolon or newline>
|
||||||
|
;
|
||||||
|
|
||||||
SimpleName
|
SimpleName
|
||||||
: <java identifier>
|
: <java identifier>
|
||||||
@@ -66,7 +76,8 @@ See [Java interoperability](java-interop.html)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
LabelName
|
LabelName
|
||||||
: "@" SimpleName;
|
: "@" SimpleName
|
||||||
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
See [Returns and jumps](returns.html)
|
See [Returns and jumps](returns.html)
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
Relevant pages: [Packages](packages.html)
|
Relevant pages: [Packages](packages.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
[start]
|
[start]
|
||||||
kotlinFile
|
kotlinFile
|
||||||
: preamble topLevelObject*
|
: preamble topLevelObject*
|
||||||
|
|||||||
Reference in New Issue
Block a user