Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(734)

Unified Diff: src/lexer/lexer_py.re

Issue 59823005: Experimental parser: handle hex escapes in strings (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer_py.re
diff --git a/src/lexer/lexer_py.re b/src/lexer/lexer_py.re
index c601ea3313dde5fe048c47ad4bdc7b6e118e069d..8afbf9ab8507a538b97419e8dc6f347ae569ce80 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -200,7 +200,8 @@ default_action <push_token(ILLEGAL)>
<<DoubleQuoteString>>
/\\\n\r?/ <||continue>
/\\\r\n?/ <||continue>
-/\\./ <||continue>
+/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[^xX\r\n]/ <||continue>
/\n|\r/ <|push_token(ILLEGAL)|>
"\"" <|push_token(STRING)|>
eof <|terminate_illegal|>
@@ -209,7 +210,8 @@ catch_all <||continue>
<<SingleQuoteString>>
/\\\n\r?/ <||continue>
/\\\r\n?/ <||continue>
-/\\./ <||continue>
+/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[^xX\r\n]/ <||continue>
/\n|\r/ <|push_token(ILLEGAL)|>
"'" <|push_token(STRING)|>
eof <|terminate_illegal|>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698