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

Unified Diff: src/lexer/lexer.re

Issue 31453004: Experimental parser: unify regexp handling with the baseline some more. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 months 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 | src/lexer/lexer-shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer.re
diff --git a/src/lexer/lexer.re b/src/lexer/lexer.re
index b67acf27e84ba9b8af68a2aa056e53eb37e96314..da2c974d8ee1ad7f91e8b33387e5722e93ef33a0 100644
--- a/src/lexer/lexer.re
+++ b/src/lexer/lexer.re
@@ -326,7 +326,8 @@ start_:
<DoubleQuoteString> '"' { PUSH_TOKEN(Token::STRING);}
<DoubleQuoteString> "\\" "\n" "\r"? { goto yy0; }
<DoubleQuoteString> "\\" "\r" "\n"? { goto yy0; }
- <DoubleQuoteString> line_terminator { TERMINATE_ILLEGAL(); }
+ <DoubleQuoteString> "\n" => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
+ <DoubleQuoteString> "\r" => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
<DoubleQuoteString> eof { TERMINATE_ILLEGAL(); }
<DoubleQuoteString> any { goto yy0; }
@@ -334,7 +335,8 @@ start_:
<SingleQuoteString> "'" { PUSH_TOKEN(Token::STRING);}
<SingleQuoteString> "\\" "\n" "\r"? { goto yy0; }
<SingleQuoteString> "\\" "\r" "\n"? { goto yy0; }
- <SingleQuoteString> line_terminator { TERMINATE_ILLEGAL(); }
+ <SingleQuoteString> "\n" => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
+ <SingleQuoteString> "\r" => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
<SingleQuoteString> eof { TERMINATE_ILLEGAL(); }
<SingleQuoteString> any { goto yy0; }
« no previous file with comments | « no previous file | src/lexer/lexer-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698