diff --git a/docs/Solidity.g4 b/docs/Solidity.g4 index f86d95fc4..91f59d78c 100644 --- a/docs/Solidity.g4 +++ b/docs/Solidity.g4 @@ -253,6 +253,7 @@ primaryExpression | numberLiteral | hexLiteral | stringLiteral + | unicodeStringLiteral | identifier ('[' ']')? | TypeKeyword | tupleExpression @@ -461,6 +462,13 @@ StringLiteralFragment : '"' DoubleQuotedStringCharacter* '"' | '\'' SingleQuotedStringCharacter* '\'' ; +unicodeStringLiteral + : UnicodeStringLiteralFragment+ ; + +UnicodeStringLiteralFragment + : 'unicode"' DoubleQuotedStringCharacter* '"' + | 'unicode\'' SingleQuotedStringCharacter* '\'' ; + fragment DoubleQuotedStringCharacter : ~["\r\n\\] | ('\\' .) ;