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

Unified Diff: src/lexer/lexer_py.re

Issue 64913011: Experimental parser: implement skip (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 | « src/lexer/lexer.re ('k') | tools/lexer_generator/code_generator.py » ('j') | 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 cf0f1806edef205a754ac3958df6cf4eb9b9a8b7..4d03a129cdc78c555feff8e2ef757c6e2c64d1c1 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -100,7 +100,7 @@ number push_token(NUMBER)
"," push_token(COMMA)
line_terminator+ { PUSH_LINE_TERMINATOR(); }
-whitespace { SKIP(); } # TODO implement skip
+whitespace <<skip>>
"\"" <<DoubleQuoteString>>
"'" <<SingleQuoteString>>
@@ -159,7 +159,7 @@ identifier_start push_token(IDENTIFIER) <<Identifier>>
}
} <<Identifier>>
-eof { PUSH_TOKEN(Token::EOS); return 0; }
+eof <<terminate>>
default_action push_token(ILLEGAL)
<DoubleQuoteString>
@@ -181,32 +181,26 @@ eof <<terminate_illegal>>
catch_all <<continue>>
<Identifier>
-identifier_char <<continue>>
+identifier_char push_token(IDENTIFIER) <<continue>>
/\\u[0-9a-fA-F]{4}/ {
if (V8_UNLIKELY(!ValidIdentifierStart())) {
PUSH_TOKEN(Token::ILLEGAL);
}
} <<continue>>
-default_action push_token(IDENTIFIER)
<SingleLineComment>
line_terminator { PUSH_LINE_TERMINATOR(); }
-eof <<terminate>>
catch_all <<continue>>
<MultiLineComment>
-"*/" { SKIP(); goto code_start;}
+"*/" <<skip>>
/\*[^\057]/ <<continue>>
-# need to force action
-line_terminator+ { PUSH_LINE_TERMINATOR(); } <<continue>>
-eof <<terminate>>
+line_terminator { PUSH_LINE_TERMINATOR(); } <<continue>>
catch_all <<continue>>
<HtmlComment>
-"-->" { SKIP(); }
+"-->" <<skip>>
/--./ <<continue>>
/-./ <<continue>>
-# need to force action
-line_terminator+ { PUSH_LINE_TERMINATOR(); } <<continue>>
-eof <<terminate>>
+line_terminator { PUSH_LINE_TERMINATOR(); } <<continue>>
catch_all <<continue>>
« no previous file with comments | « src/lexer/lexer.re ('k') | tools/lexer_generator/code_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698