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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/parse/lexer.py

Issue 474063002: Mojo: add support for {double,float}.{INFINITY,NEGATIVE_INFINITY,NAN} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
index 6104615f3fa7e6154036b0e8aa80c675297831c7..ff89aed761ba089c1214fac87f3973c835e3a25f 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
@@ -145,7 +145,7 @@ class Lexer(object):
fractional_constant = r"""([0-9]*\.[0-9]+)|([0-9]+\.)"""
floating_constant = \
'(((('+fractional_constant+')'+ \
- exponent_part+'?)|([0-9]+'+exponent_part+')))'
+ exponent_part+'?)|([0-9]+'+exponent_part+'))|[-+]?Inf|NaN)'
viettrungluu 2014/08/14 22:32:25 Currently, for numbers, we use unary minus (and pl
# Ordinals
ordinal = r'@[0-9]+'

Powered by Google App Engine
This is Rietveld 408576698