Chromium Code Reviews| Index: ppapi/generators/idl_lexer.py |
| diff --git a/ppapi/generators/idl_lexer.py b/ppapi/generators/idl_lexer.py |
| index d33414c3daf0cc38d5ca66f5a15e1755b3a3aeae..d2414ced19eda3b29c2fa846cadf3ec3a35f4e1b 100755 |
| --- a/ppapi/generators/idl_lexer.py |
| +++ b/ppapi/generators/idl_lexer.py |
| @@ -55,6 +55,16 @@ class IDLLexer(object): |
| 'STRUCT', |
| 'TYPEDEF', |
| + # Extra WebIDL keywords |
| + 'CALLBACK', |
| + 'DICTIONARY', |
| + 'OPTIONAL', |
| + 'STATIC', |
| + |
| + # Invented for apps use |
| + 'NAMESPACE', |
| + |
| + |
| # Data types |
| 'FLOAT', |
| 'OCT', |
| @@ -77,11 +87,17 @@ class IDLLexer(object): |
| 'readonly' : 'READONLY', |
| 'struct' : 'STRUCT', |
| 'typedef' : 'TYPEDEF', |
| + |
| + 'callback' : 'CALLBACK', |
| + 'dictionary' : 'DICTIONARY', |
| + 'optional' : 'OPTIONAL', |
| + 'static' : 'STATIC', |
| + 'namespace' : 'NAMESPACE', |
| } |
| # '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 |
| # |
| @@ -116,7 +132,7 @@ class IDLLexer(object): |
| # A C or C++ style comment: /* xxx */ or // |
| def t_COMMENT(self, t): |
| - r'(/\*(.|\n)*?\*/)|(//.*)' |
| + r'(/\*(.|\n)*?\*/)|(//.*(\n//.*)*)' |
|
noelallen1
2012/02/28 22:31:33
Isn't this missing indentation/whitespace between
asargent_no_longer_on_chrome
2012/03/03 01:12:02
Done.
|
| self.AddLines(t.value.count('\n')) |
| return t |