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

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

Issue 653343002: Support Promise<T> syntax in the IDL parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 'inherit' : 'INHERIT', 86 'inherit' : 'INHERIT',
87 'interface' : 'INTERFACE', 87 'interface' : 'INTERFACE',
88 'legacycaller' : 'LEGACYCALLER', 88 'legacycaller' : 'LEGACYCALLER',
89 'long' : 'LONG', 89 'long' : 'LONG',
90 'Nan' : 'NAN', 90 'Nan' : 'NAN',
91 'null' : 'NULL', 91 'null' : 'NULL',
92 'object' : 'OBJECT', 92 'object' : 'OBJECT',
93 'octet' : 'OCTET', 93 'octet' : 'OCTET',
94 'optional' : 'OPTIONAL', 94 'optional' : 'OPTIONAL',
95 'or' : 'OR', 95 'or' : 'OR',
96 'partial' : 'PARTIAL', 96 'partial' : 'PARTIAL',
97 'Promise' : 'PROMISE',
97 'readonly' : 'READONLY', 98 'readonly' : 'READONLY',
98 'RegExp' : 'REGEXP', 99 'RegExp' : 'REGEXP',
99 'sequence' : 'SEQUENCE', 100 'sequence' : 'SEQUENCE',
100 'serializer' : 'SERIALIZER', 101 'serializer' : 'SERIALIZER',
101 'setter': 'SETTER', 102 'setter': 'SETTER',
102 'short' : 'SHORT', 103 'short' : 'SHORT',
103 'static' : 'STATIC', 104 'static' : 'STATIC',
104 'stringifier' : 'STRINGIFIER', 105 'stringifier' : 'STRINGIFIER',
105 'typedef' : 'TYPEDEF', 106 'typedef' : 'TYPEDEF',
106 'true' : 'TRUE', 107 'true' : 'TRUE',
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 self.tokens = [] 280 self.tokens = []
280 self._AddTokens(IDLLexer.tokens) 281 self._AddTokens(IDLLexer.tokens)
281 self._AddKeywords(IDLLexer.keywords) 282 self._AddKeywords(IDLLexer.keywords)
282 self._lexobj = None 283 self._lexobj = None
283 self.last = None 284 self.last = None
284 self.lines = None 285 self.lines = None
285 286
286 # If run by itself, attempt to build the lexer 287 # If run by itself, attempt to build the lexer
287 if __name__ == '__main__': 288 if __name__ == '__main__':
288 lexer_object = IDLLexer() 289 lexer_object = IDLLexer()
OLDNEW
« no previous file with comments | « no previous file | tools/idl_parser/idl_parser.py » ('j') | tools/idl_parser/test_parser/struct_ppapi.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698