mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update grammar for unicode literals
This commit is contained in:
parent
f5f86779b8
commit
1f39640392
@ -253,6 +253,7 @@ primaryExpression
|
|||||||
| numberLiteral
|
| numberLiteral
|
||||||
| hexLiteral
|
| hexLiteral
|
||||||
| stringLiteral
|
| stringLiteral
|
||||||
|
| unicodeStringLiteral
|
||||||
| identifier ('[' ']')?
|
| identifier ('[' ']')?
|
||||||
| TypeKeyword
|
| TypeKeyword
|
||||||
| tupleExpression
|
| tupleExpression
|
||||||
@ -461,6 +462,13 @@ StringLiteralFragment
|
|||||||
: '"' DoubleQuotedStringCharacter* '"'
|
: '"' DoubleQuotedStringCharacter* '"'
|
||||||
| '\'' SingleQuotedStringCharacter* '\'' ;
|
| '\'' SingleQuotedStringCharacter* '\'' ;
|
||||||
|
|
||||||
|
unicodeStringLiteral
|
||||||
|
: UnicodeStringLiteralFragment+ ;
|
||||||
|
|
||||||
|
UnicodeStringLiteralFragment
|
||||||
|
: 'unicode"' DoubleQuotedStringCharacter* '"'
|
||||||
|
| 'unicode\'' SingleQuotedStringCharacter* '\'' ;
|
||||||
|
|
||||||
fragment
|
fragment
|
||||||
DoubleQuotedStringCharacter
|
DoubleQuotedStringCharacter
|
||||||
: ~["\r\n\\] | ('\\' .) ;
|
: ~["\r\n\\] | ('\\' .) ;
|
||||||
|
Loading…
Reference in New Issue
Block a user