| OLD | NEW |
| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 Token('IDENTIFIER', "", 0), # must be last | 162 Token('IDENTIFIER', "", 0), # must be last |
| 163 | 163 |
| 164 ] | 164 ] |
| 165 | 165 |
| 166 # TODO(jimhug): Validate this list with Dart.g and with the lang spec. | 166 # TODO(jimhug): Validate this list with Dart.g and with the lang spec. |
| 167 keywords = [ | 167 keywords = [ |
| 168 Keyword('ABSTRACT', "abstract", True), | 168 Keyword('ABSTRACT', "abstract", True), |
| 169 Keyword('ASSERT', "assert", True), | 169 Keyword('ASSERT', "assert", True), |
| 170 Keyword('AWAIT', "await", False), # experimental feature | 170 Keyword('AWAIT', "await", False), # experimental feature |
| 171 Keyword('BREAK', "break", False), | 171 Keyword('BREAK', "break", False), |
| 172 Keyword('CALL', "call", True), |
| 172 Keyword('CASE', "case", False), | 173 Keyword('CASE', "case", False), |
| 173 Keyword('CATCH', "catch", False), | 174 Keyword('CATCH', "catch", False), |
| 174 Keyword('CLASS', "class", False), | 175 Keyword('CLASS', "class", False), |
| 175 Keyword('CONST', "const", False), | 176 Keyword('CONST', "const", False), |
| 176 Keyword('CONTINUE', "continue", False), | 177 Keyword('CONTINUE', "continue", False), |
| 177 Keyword('DEFAULT', "default", False), | 178 Keyword('DEFAULT', "default", False), |
| 178 Keyword('DO', "do", False), | 179 Keyword('DO', "do", False), |
| 179 Keyword('ELSE', "else", False), | 180 Keyword('ELSE', "else", False), |
| 180 Keyword('EXTENDS', "extends", False), | 181 Keyword('EXTENDS', "extends", False), |
| 181 Keyword('FACTORY', "factory", True), | 182 Keyword('FACTORY', "factory", True), |
| (...skipping 21 matching lines...) Expand all Loading... |
| 203 Keyword('SUPER', "super", False), | 204 Keyword('SUPER', "super", False), |
| 204 Keyword('SWITCH', "switch", False), | 205 Keyword('SWITCH', "switch", False), |
| 205 Keyword('THIS', "this", False), | 206 Keyword('THIS', "this", False), |
| 206 Keyword('THROW', "throw", False), | 207 Keyword('THROW', "throw", False), |
| 207 Keyword('TRUE', "true", False), | 208 Keyword('TRUE', "true", False), |
| 208 Keyword('TYPEDEF', "typedef", True), | 209 Keyword('TYPEDEF', "typedef", True), |
| 209 Keyword('TRY', "try", False), | 210 Keyword('TRY', "try", False), |
| 210 Keyword('VAR', "var", False), | 211 Keyword('VAR', "var", False), |
| 211 Keyword('VOID', "void", False), | 212 Keyword('VOID', "void", False), |
| 212 Keyword('WHILE', "while", False)] | 213 Keyword('WHILE', "while", False)] |
| OLD | NEW |