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

Side by Side Diff: frog/scripts/token_info.py

Issue 8457007: Better runtime type checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cleaner output Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 class Token: 5 class Token:
6 def __init__(self, name, text, precedence, customFinishCode=None, 6 def __init__(self, name, text, precedence, customFinishCode=None,
7 stringRepr=None): 7 stringRepr=None):
8 self.name = name 8 self.name = name
9 self.text = text 9 self.text = text
10 self.precedence = precedence 10 self.precedence = precedence
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 Token('LTE', "<=", 10), 125 Token('LTE', "<=", 10),
126 Token('GTE', ">=", 10), 126 Token('GTE', ">=", 10),
127 127
128 # Special tokens for index operator methods 128 # Special tokens for index operator methods
129 Token('INDEX', "[]", 0), 129 Token('INDEX', "[]", 0),
130 Token('SETINDEX', "[]=", 0), 130 Token('SETINDEX', "[]=", 0),
131 131
132 132
133 Token('STRING', "", 0), 133 Token('STRING', "", 0),
134 Token('STRING_PART', "", 0), 134 Token('STRING_PART', "", 0),
135 Token('NUMBER', "", 0), 135 Token('INTEGER', "", 0),
136 Token('HEX_NUMBER', "", 0), 136 Token('HEX_INTEGER', "", 0),
137 Token('DOUBLE', "", 0),
137 138
138 Token('WHITESPACE', "", 0), 139 Token('WHITESPACE', "", 0),
139 Token('COMMENT', "", 0), 140 Token('COMMENT', "", 0),
140 Token('ERROR', "", 0), 141 Token('ERROR', "", 0),
141 142
142 Token('INCOMPLETE_STRING', "", 0), 143 Token('INCOMPLETE_STRING', "", 0),
143 Token('INCOMPLETE_COMMENT', "", 0), 144 Token('INCOMPLETE_COMMENT', "", 0),
144 Token('INCOMPLETE_MULTILINE_STRING_DQ', "", 0), 145 Token('INCOMPLETE_MULTILINE_STRING_DQ', "", 0),
145 Token('INCOMPLETE_MULTILINE_STRING_SQ', "", 0), 146 Token('INCOMPLETE_MULTILINE_STRING_SQ', "", 0),
146 147
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Keyword('SUPER', "super", False), 202 Keyword('SUPER', "super", False),
202 Keyword('SWITCH', "switch", False), 203 Keyword('SWITCH', "switch", False),
203 Keyword('THIS', "this", False), 204 Keyword('THIS', "this", False),
204 Keyword('THROW', "throw", False), 205 Keyword('THROW', "throw", False),
205 Keyword('TRUE', "true", False), 206 Keyword('TRUE', "true", False),
206 Keyword('TYPEDEF', "typedef", True), 207 Keyword('TYPEDEF', "typedef", True),
207 Keyword('TRY', "try", False), 208 Keyword('TRY', "try", False),
208 Keyword('VAR', "var", False), 209 Keyword('VAR', "var", False),
209 Keyword('VOID', "void", False), 210 Keyword('VOID', "void", False),
210 Keyword('WHILE', "while", False)] 211 Keyword('WHILE', "while", False)]
OLDNEW
« frog/presubmit.py ('K') | « frog/presubmit.py ('k') | frog/tests/TokenizerTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698