| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 interface Scanner { | 5 interface Scanner { |
| 6 Token tokenize(); | 6 Token tokenize(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Common base class for a Dart scanner. | 10 * Common base class for a Dart scanner. |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 next = advance(); | 334 next = advance(); |
| 335 if (next === $EQ) { | 335 if (next === $EQ) { |
| 336 return select($EQ, BANG_EQ_EQ_INFO, BANG_EQ_INFO); | 336 return select($EQ, BANG_EQ_EQ_INFO, BANG_EQ_INFO); |
| 337 } | 337 } |
| 338 appendPrecedenceToken(BANG_INFO); | 338 appendPrecedenceToken(BANG_INFO); |
| 339 return next; | 339 return next; |
| 340 } | 340 } |
| 341 | 341 |
| 342 int tokenizeEquals(int next) { | 342 int tokenizeEquals(int next) { |
| 343 // = == === | 343 // = == === |
| 344 discardOpenLt(); |
| 344 next = advance(); | 345 next = advance(); |
| 345 if (next === $EQ) { | 346 if (next === $EQ) { |
| 346 return select($EQ, EQ_EQ_EQ_INFO, EQ_EQ_INFO); | 347 return select($EQ, EQ_EQ_EQ_INFO, EQ_EQ_INFO); |
| 347 } else if (next === $GT) { | 348 } else if (next === $GT) { |
| 348 appendPrecedenceToken(FUNCTION_INFO); | 349 appendPrecedenceToken(FUNCTION_INFO); |
| 349 return advance(); | 350 return advance(); |
| 350 } | 351 } |
| 351 appendPrecedenceToken(EQ_INFO); | 352 appendPrecedenceToken(EQ_INFO); |
| 352 return next; | 353 return next; |
| 353 } | 354 } |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 charOffset); | 762 charOffset); |
| 762 } | 763 } |
| 763 } | 764 } |
| 764 | 765 |
| 765 class MalformedInputException { | 766 class MalformedInputException { |
| 766 final String message; | 767 final String message; |
| 767 final position; | 768 final position; |
| 768 MalformedInputException(this.message, this.position); | 769 MalformedInputException(this.message, this.position); |
| 769 toString() => message; | 770 toString() => message; |
| 770 } | 771 } |
| OLD | NEW |