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

Unified Diff: ppapi/generators/idl_lexer.py

Issue 8161006: Allow enum values in IDL files to be simple arithmetic expressions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | ppapi/generators/idl_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_lexer.py
===================================================================
--- ppapi/generators/idl_lexer.py (revision 104195)
+++ ppapi/generators/idl_lexer.py (working copy)
@@ -64,7 +64,8 @@
'STRING',
# Operators
- 'LSHIFT'
+ 'LSHIFT',
+ 'RSHIFT'
]
# 'keywords' is a map of string to token type. All SYMBOL tokens are
@@ -82,7 +83,7 @@
# 'literals' is a value expected by lex which specifies a list of valid
# literal tokens, meaning the token type and token value are identical.
- literals = '"*.(){}[],;:=+-'
+ literals = '"*.(){}[],;:=+-/~|&^'
# Token definitions
#
@@ -100,6 +101,7 @@
t_OCT = r'-?0[0-7]+'
t_HEX = r'-?0[Xx][0-9A-Fa-f]+'
t_LSHIFT = r'<<'
+ t_RSHIFT = r'>>'
# A line ending '\n', we use this to increment the line number
def t_LINE_END(self, t):
« no previous file with comments | « no previous file | ppapi/generators/idl_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698