Reviewers: marja,

Message:
Committed patchset #1 manually as r19313 (tree was closed).

Description:
Experimental parser: small cleanup

[email protected]

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=19313

Please review this at https://codereview.chromium.org/155763005/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser

Affected files (+2, -5 lines):
  M tools/lexer_generator/nfa_builder.py


Index: tools/lexer_generator/nfa_builder.py
diff --git a/tools/lexer_generator/nfa_builder.py b/tools/lexer_generator/nfa_builder.py index 97ecfa15512dd843c8d86170349a378e020f56cc..dfb57504a63745348e0fb5672354de21b9aa8b23 100644
--- a/tools/lexer_generator/nfa_builder.py
+++ b/tools/lexer_generator/nfa_builder.py
@@ -309,22 +309,19 @@ class NfaBuilder(object):
   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.

Reply via email to