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

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

Issue 290693003: Mojo: Mojom: Remove integer suffixes (e.g., u, l, ul, etc.). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 7 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 | « no previous file | mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18d1b13c8c96819157fbc2c4267921b2f895e612..eff1bde118edcce971db22b66c8cb08da1b43c4f 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
@@ -120,12 +120,9 @@ class Lexer(object):
hex_digits = '[0-9a-fA-F]+'
# integer constants (K&R2: A.2.5.1)
- integer_suffix_opt = \
- r'(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?'
- decimal_constant = \
- '(0'+integer_suffix_opt+')|([1-9][0-9]*'+integer_suffix_opt+')'
- octal_constant = '0[0-7]*'+integer_suffix_opt
- hex_constant = hex_prefix+hex_digits+integer_suffix_opt
+ decimal_constant = '0|([1-9][0-9]*)'
+ octal_constant = '0[0-7]+'
+ hex_constant = hex_prefix+hex_digits
bad_octal_constant = '0[0-7]*[89]'
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom_tests/parse/lexer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698