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

Unified Diff: tools/lexer_generator/term.py

Issue 170253007: Experimental parser: always apply default transitions (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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 | « tools/lexer_generator/nfa_builder.py ('k') | tools/lexer_generator/test/term_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/term.py
diff --git a/tools/lexer_generator/term.py b/tools/lexer_generator/term.py
index 3dde1bb689bda54a67059bc177daa1d2060a885c..9cd045b5ce75958e974a73245552f81815155dfc 100644
--- a/tools/lexer_generator/term.py
+++ b/tools/lexer_generator/term.py
@@ -67,5 +67,8 @@ class Term(object):
# TODO(dcarney): escape '(', ')' and ',' in strings
def __str__(self):
if self.__str == None:
- self.__str = '(%s)' % ','.join(map(str, self.__tuple))
+ if not self:
+ self.__str = ''
+ else:
+ self.__str = '%s(%s)' % (self.name(), ','.join(map(str, self.args())))
return self.__str
« no previous file with comments | « tools/lexer_generator/nfa_builder.py ('k') | tools/lexer_generator/test/term_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698