| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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('CASE', "case", False), | 172 Keyword('CASE', "case", False), |
| 173 Keyword('CATCH', "catch", False), | 173 Keyword('CATCH', "catch", False), |
| 174 Keyword('CLASS', "class", True), | 174 Keyword('CLASS', "class", False), |
| 175 Keyword('CONST', "const", False), | 175 Keyword('CONST', "const", False), |
| 176 Keyword('CONTINUE', "continue", False), | 176 Keyword('CONTINUE', "continue", False), |
| 177 Keyword('DEFAULT', "default", False), | 177 Keyword('DEFAULT', "default", False), |
| 178 Keyword('DO', "do", False), | 178 Keyword('DO', "do", False), |
| 179 Keyword('ELSE', "else", False), | 179 Keyword('ELSE', "else", False), |
| 180 Keyword('EXTENDS', "extends", True), | 180 Keyword('EXTENDS', "extends", False), |
| 181 Keyword('FACTORY', "factory", True), | 181 Keyword('FACTORY', "factory", True), |
| 182 Keyword('FALSE', "false", False), | 182 Keyword('FALSE', "false", False), |
| 183 Keyword('FINAL', "final", False), | 183 Keyword('FINAL', "final", False), |
| 184 Keyword('FINALLY', "finally", False), | 184 Keyword('FINALLY', "finally", False), |
| 185 Keyword('FOR', "for", False), | 185 Keyword('FOR', "for", False), |
| 186 Keyword('GET', "get", True), | 186 Keyword('GET', "get", True), |
| 187 Keyword('IF', "if", False), | 187 Keyword('IF', "if", False), |
| 188 Keyword('IMPLEMENTS', "implements", True), | 188 Keyword('IMPLEMENTS', "implements", True), |
| 189 Keyword('IMPORT', "import", True), | 189 Keyword('IMPORT', "import", True), |
| 190 Keyword('IN', "in", False), | 190 Keyword('IN', "in", False), |
| (...skipping 12 matching lines...) Expand all Loading... |
| 203 Keyword('SUPER', "super", False), | 203 Keyword('SUPER', "super", False), |
| 204 Keyword('SWITCH', "switch", False), | 204 Keyword('SWITCH', "switch", False), |
| 205 Keyword('THIS', "this", False), | 205 Keyword('THIS', "this", False), |
| 206 Keyword('THROW', "throw", False), | 206 Keyword('THROW', "throw", False), |
| 207 Keyword('TRUE', "true", False), | 207 Keyword('TRUE', "true", False), |
| 208 Keyword('TYPEDEF', "typedef", True), | 208 Keyword('TYPEDEF', "typedef", True), |
| 209 Keyword('TRY', "try", False), | 209 Keyword('TRY', "try", False), |
| 210 Keyword('VAR', "var", False), | 210 Keyword('VAR', "var", False), |
| 211 Keyword('VOID', "void", False), | 211 Keyword('VOID', "void", False), |
| 212 Keyword('WHILE', "while", False)] | 212 Keyword('WHILE', "while", False)] |
| OLD | NEW |