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

Unified Diff: tools/lexer_generator/transition_keys.py

Issue 73023005: Experimental lexer generator: random refactoring + comments. (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 | « tools/lexer_generator/nfa.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/transition_keys.py
diff --git a/tools/lexer_generator/transition_keys.py b/tools/lexer_generator/transition_keys.py
index d0eb5b1f16d069ebe5862b749aa907f41ab02ba0..ba0d9db40cb615605929d0619f752d0326d7a60a 100644
--- a/tools/lexer_generator/transition_keys.py
+++ b/tools/lexer_generator/transition_keys.py
@@ -103,11 +103,9 @@ class TransitionKey:
@staticmethod
def any():
'''Returns a TransitionKey which matches any character.'''
- def bounds_getter(name):
- bounds = TransitionKey.__class_bounds.values()
- bounds.sort()
- return bounds
- return TransitionKey.__cached_key('any', bounds_getter)
+ return TransitionKey.__cached_key(
+ 'any',
+ lambda name : sorted(TransitionKey.__class_bounds.values()))
@staticmethod
def single_char(char):
« no previous file with comments | « tools/lexer_generator/nfa.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698