| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:front_end/src/base/errors.dart'; | 5 import 'package:front_end/src/base/errors.dart'; |
| 6 import 'package:front_end/src/base/jenkins_smi_hash.dart'; | 6 import 'package:front_end/src/base/jenkins_smi_hash.dart'; |
| 7 import 'package:front_end/src/scanner/errors.dart'; | 7 import 'package:front_end/src/scanner/errors.dart'; |
| 8 import 'package:front_end/src/scanner/reader.dart'; | 8 import 'package:front_end/src/scanner/reader.dart'; |
| 9 import 'package:front_end/src/scanner/scanner.dart'; | 9 import 'package:front_end/src/scanner/scanner.dart'; |
| 10 import 'package:front_end/src/scanner/token.dart'; | 10 import 'package:front_end/src/scanner/token.dart'; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 359 } |
| 360 | 360 |
| 361 void test_eq() { | 361 void test_eq() { |
| 362 _assertToken(TokenType.EQ, "="); | 362 _assertToken(TokenType.EQ, "="); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void test_eq_eq() { | 365 void test_eq_eq() { |
| 366 _assertToken(TokenType.EQ_EQ, "=="); | 366 _assertToken(TokenType.EQ_EQ, "=="); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void test_function() { |
| 370 _assertToken(TokenType.FUNCTION, "=>"); |
| 371 } |
| 372 |
| 369 void test_gt() { | 373 void test_gt() { |
| 370 _assertToken(TokenType.GT, ">"); | 374 _assertToken(TokenType.GT, ">"); |
| 371 } | 375 } |
| 372 | 376 |
| 373 void test_gt_eq() { | 377 void test_gt_eq() { |
| 374 _assertToken(TokenType.GT_EQ, ">="); | 378 _assertToken(TokenType.GT_EQ, ">="); |
| 375 } | 379 } |
| 376 | 380 |
| 377 void test_gt_gt() { | 381 void test_gt_gt() { |
| 378 _assertToken(TokenType.GT_GT, ">>"); | 382 _assertToken(TokenType.GT_GT, ">>"); |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 _TestScanner(CharacterReader reader, [this.listener]) : super(reader); | 1411 _TestScanner(CharacterReader reader, [this.listener]) : super(reader); |
| 1408 | 1412 |
| 1409 @override | 1413 @override |
| 1410 void reportError( | 1414 void reportError( |
| 1411 ScannerErrorCode errorCode, int offset, List<Object> arguments) { | 1415 ScannerErrorCode errorCode, int offset, List<Object> arguments) { |
| 1412 if (listener != null) { | 1416 if (listener != null) { |
| 1413 listener.errors.add(new TestError(offset, errorCode, arguments)); | 1417 listener.errors.add(new TestError(offset, errorCode, arguments)); |
| 1414 } | 1418 } |
| 1415 } | 1419 } |
| 1416 } | 1420 } |
| OLD | NEW |