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

Side by Side Diff: tools/idl_parser/idl_lexer.py

Issue 1295083004: Support FrozenArray in idl_parser.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/idl_parser/idl_parser.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Lexer for PPAPI IDL 6 """ Lexer for PPAPI IDL
7 7
8 The lexer uses the PLY library to build a tokenizer which understands both 8 The lexer uses the PLY library to build a tokenizer which understands both
9 WebIDL and Pepper tokens. 9 WebIDL and Pepper tokens.
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 'creator' : 'CREATOR', 73 'creator' : 'CREATOR',
74 'Date' : 'DATE', 74 'Date' : 'DATE',
75 'deleter' : 'DELETER', 75 'deleter' : 'DELETER',
76 'dictionary' : 'DICTIONARY', 76 'dictionary' : 'DICTIONARY',
77 'DOMString' : 'DOMSTRING', 77 'DOMString' : 'DOMSTRING',
78 'double' : 'DOUBLE', 78 'double' : 'DOUBLE',
79 'enum' : 'ENUM', 79 'enum' : 'ENUM',
80 'exception' : 'EXCEPTION', 80 'exception' : 'EXCEPTION',
81 'false' : 'FALSE', 81 'false' : 'FALSE',
82 'float' : 'FLOAT', 82 'float' : 'FLOAT',
83 'FrozenArray' : 'FROZENARRAY',
haraken 2015/08/19 01:14:18 Nit: This dictionary should be alphabetically sort
bashi 2015/08/19 01:19:04 Yeah, but this dict seems to use case-insensitive
83 'getter': 'GETTER', 84 'getter': 'GETTER',
84 'implements' : 'IMPLEMENTS', 85 'implements' : 'IMPLEMENTS',
85 'Infinity' : 'INFINITY', 86 'Infinity' : 'INFINITY',
86 'inherit' : 'INHERIT', 87 'inherit' : 'INHERIT',
87 'interface' : 'INTERFACE', 88 'interface' : 'INTERFACE',
88 'iterable': 'ITERABLE', 89 'iterable': 'ITERABLE',
89 'legacycaller' : 'LEGACYCALLER', 90 'legacycaller' : 'LEGACYCALLER',
90 'legacyiterable' : 'LEGACYITERABLE', 91 'legacyiterable' : 'LEGACYITERABLE',
91 'long' : 'LONG', 92 'long' : 'LONG',
92 'maplike': 'MAPLIKE', 93 'maplike': 'MAPLIKE',
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 self.tokens = [] 286 self.tokens = []
286 self._AddTokens(IDLLexer.tokens) 287 self._AddTokens(IDLLexer.tokens)
287 self._AddKeywords(IDLLexer.keywords) 288 self._AddKeywords(IDLLexer.keywords)
288 self._lexobj = None 289 self._lexobj = None
289 self.last = None 290 self.last = None
290 self.lines = None 291 self.lines = None
291 292
292 # If run by itself, attempt to build the lexer 293 # If run by itself, attempt to build the lexer
293 if __name__ == '__main__': 294 if __name__ == '__main__':
294 lexer_object = IDLLexer() 295 lexer_object = IDLLexer()
OLDNEW
« no previous file with comments | « no previous file | tools/idl_parser/idl_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698