Disallow uppercase X in hex number literals

This commit is contained in:
hydai
2018-09-19 22:01:15 +08:00
parent 5f919d02ab
commit b409faa675
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
Identifier = [a-zA-Z_$] [a-zA-Z_$0-9]*
HexNumber = '0' [xX] [0-9a-fA-F]+
HexNumber = '0x' [0-9a-fA-F]+
DecimalNumber = [0-9]+ ( '.' [0-9]* )? ( [eE] [0-9]+ )?
TupleExpression = '(' ( Expression? ( ',' Expression? )* )? ')'