Revision: 19313
Author: [email protected]
Date: Wed Feb 12 09:33:01 2014 UTC
Log: Experimental parser: small cleanup
[email protected]
BUG=
Review URL: https://codereview.chromium.org/155763005
http://code.google.com/p/v8/source/detail?r=19313
Modified:
/branches/experimental/parser/tools/lexer_generator/nfa_builder.py
=======================================
--- /branches/experimental/parser/tools/lexer_generator/nfa_builder.py Wed
Feb 12 09:23:12 2014 UTC
+++ /branches/experimental/parser/tools/lexer_generator/nfa_builder.py Wed
Feb 12 09:33:01 2014 UTC
@@ -309,22 +309,19 @@
def __flatten_terms(terms, name):
for term in terms:
assert isinstance(term, Term)
- if not term:
- continue
if term.name() == name:
for arg in term.args():
if arg:
yield arg
else:
- yield term
+ if term:
+ yield term
@staticmethod
def __flatten_literals(terms):
acc = ()
for term in terms:
assert isinstance(term, Term)
- if not term:
- continue
if term.name() == 'LITERAL':
acc += term.args()
else:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.