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

Unified Diff: src/lexer/lexer.re

Issue 32613002: Experimental parser: misc fixes. (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 | no next file » | 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 1ad7a1066ea5a009ba102bb846f42befb442a431..1fae29929fa86700f11eda41daa9cc46febadc60 100644
--- a/src/lexer/lexer.re
+++ b/src/lexer/lexer.re
@@ -271,6 +271,7 @@ start_:
<Normal> "<!--" :=> HtmlComment
<Normal> ">>>=" { PUSH_TOKEN(Token::ASSIGN_SHR); }
+ <Normal> ">>>" { PUSH_TOKEN(Token::SHR); }
<Normal> "<<=" { PUSH_TOKEN(Token::ASSIGN_SHL); }
<Normal> ">>=" { PUSH_TOKEN(Token::ASSIGN_SAR); }
<Normal> "<=" { PUSH_TOKEN(Token::LTE); }
@@ -325,6 +326,7 @@ start_:
<Normal> eof { PUSH_EOF_AND_RETURN();}
<Normal> any { PUSH_TOKEN(Token::ILLEGAL); }
+ <DoubleQuoteString> "\\\\" { goto yy0; }
<DoubleQuoteString> "\\\"" { goto yy0; }
<DoubleQuoteString> '"' { PUSH_TOKEN(Token::STRING);}
<DoubleQuoteString> "\\" "\n" "\r"? { goto yy0; }
@@ -334,6 +336,7 @@ start_:
<DoubleQuoteString> eof { TERMINATE_ILLEGAL(); }
<DoubleQuoteString> any { goto yy0; }
+ <SingleQuoteString> "\\\\" { goto yy0; }
<SingleQuoteString> "\\'" { goto yy0; }
<SingleQuoteString> "'" { PUSH_TOKEN(Token::STRING);}
<SingleQuoteString> "\\" "\n" "\r"? { goto yy0; }
@@ -354,7 +357,7 @@ start_:
<IdentifierIllegal> any { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
<SingleLineComment> line_terminator { PUSH_LINE_TERMINATOR();}
- <SingleLineComment> eof { PUSH_LINE_TERMINATOR();}
+ <SingleLineComment> eof { PUSH_TOKEN(Token::EOS); }
<SingleLineComment> any { goto yy0; }
<MultiLineComment> [*][//] { PUSH_LINE_TERMINATOR();}
« 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