| 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 library dart2js.tokens; | 5 library dart2js.tokens; |
| 6 | 6 |
| 7 import 'dart:collection' show HashSet; | 7 import 'dart:collection' show HashSet; |
| 8 import 'dart:convert' show UTF8; | 8 import 'dart:convert' show UTF8; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 /// A pair of tokens marking the beginning and the end of a span. Use for error | 113 /// A pair of tokens marking the beginning and the end of a span. Use for error |
| 114 /// reporting. | 114 /// reporting. |
| 115 class TokenPair implements Spannable { | 115 class TokenPair implements Spannable { |
| 116 final Token begin; | 116 final Token begin; |
| 117 final Token end; | 117 final Token end; |
| 118 | 118 |
| 119 TokenPair(this.begin, this.end); | 119 TokenPair(this.begin, this.end); |
| 120 } | 120 } |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * A [SymbolToken] represents the symbol in its precendence info. | 123 * A [SymbolToken] represents the symbol in its precedence info. |
| 124 * Also used for end of file with EOF_INFO. | 124 * Also used for end of file with EOF_INFO. |
| 125 */ | 125 */ |
| 126 class SymbolToken extends Token { | 126 class SymbolToken extends Token { |
| 127 final PrecedenceInfo info; | 127 final PrecedenceInfo info; |
| 128 | 128 |
| 129 SymbolToken(this.info, int charOffset) : super(charOffset); | 129 SymbolToken(this.info, int charOffset) : super(charOffset); |
| 130 | 130 |
| 131 String get value => info.value; | 131 String get value => info.value; |
| 132 | 132 |
| 133 String get stringValue => info.value; | 133 String get stringValue => info.value; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 value == '<=' || | 421 value == '<=' || |
| 422 value == '<' || | 422 value == '<' || |
| 423 value == '&' || | 423 value == '&' || |
| 424 value == '^' || | 424 value == '^' || |
| 425 value == '|'; | 425 value == '|'; |
| 426 } | 426 } |
| 427 | 427 |
| 428 bool isTernaryOperator(String value) => value == '[]='; | 428 bool isTernaryOperator(String value) => value == '[]='; |
| 429 | 429 |
| 430 bool isMinusOperator(String value) => value == '-'; | 430 bool isMinusOperator(String value) => value == '-'; |
| OLD | NEW |