|
|
@@ -405,6 +405,10 @@ def IsKeyword(name): |
|
|
|
|
|
# Backslash that ends a line. Note '.' doesn't match a newline character.
|
|
|
C('\\\n', Id.Char_Literals),
|
|
|
|
|
|
# e.g. \A is not an escape, and \x doesn't match a hex escape. This could be
|
|
|
# an error.
|
|
|
C('\\', Id.Char_Literals),
|
|
|
]
|
|
|
|
|
|
# Used by ECHO_LEXER in core/builtin.py.
|
|
|
@@ -415,12 +419,6 @@ def IsKeyword(name): |
|
|
|
|
|
C(r'\c', Id.Char_Stop),
|
|
|
|
|
|
# e.g. \A -> \A, is not a backslash escape.
|
|
|
# This has to come AFTER the \c and so forth.
|
|
|
#
|
|
|
# This includes embedded \n? Is that possible with echo -e?
|
|
|
R(r'\\.', Id.Char_Literals),
|
|
|
|
|
|
# Backslash that ends the string.
|
|
|
R(r'\\$', Id.Char_Literals),
|
|
|
|
|
|
@@ -443,9 +441,6 @@ def IsKeyword(name): |
|
|
# well.
|
|
|
R(r"[^\\'\0]+", Id.Char_Literals),
|
|
|
|
|
|
# e.g. \x doesn't match a hex escape. This could be an error.
|
|
|
C('\\', Id.Char_Literals),
|
|
|
|
|
|
C("'", Id.Right_SingleQuote),
|
|
|
|
|
|
# Backslash that ends the file! Caught by re2c exhaustiveness check. Parser
|
|
|
|
0 comments on commit
5555e82