| 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 library fasta.analyzer.token_utils; | 5 library fasta.analyzer.token_utils; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/parser/error_kind.dart' show ErrorKind; | 7 import '../parser/error_kind.dart' show ErrorKind; |
| 8 | 8 |
| 9 import 'package:front_end/src/fasta/scanner/error_token.dart' show ErrorToken; | 9 import '../scanner/error_token.dart' show ErrorToken; |
| 10 | 10 |
| 11 import 'package:front_end/src/fasta/scanner/keyword.dart' show Keyword; | 11 import '../scanner/keyword.dart' show Keyword; |
| 12 | 12 |
| 13 import 'package:front_end/src/fasta/scanner/precedence.dart'; | 13 import '../scanner/precedence.dart'; |
| 14 | 14 |
| 15 import 'package:front_end/src/fasta/scanner/token.dart' | 15 import '../scanner/token.dart' |
| 16 show BeginGroupToken, KeywordToken, StringToken, SymbolToken, Token; | 16 show BeginGroupToken, KeywordToken, StringToken, SymbolToken, Token; |
| 17 | 17 |
| 18 import 'package:front_end/src/fasta/scanner/token_constants.dart'; | 18 import '../scanner/token_constants.dart'; |
| 19 | 19 |
| 20 import 'package:front_end/src/scanner/token.dart' as analyzer | 20 import '../../scanner/token.dart' as analyzer |
| 21 show | 21 show |
| 22 BeginToken, | 22 BeginToken, |
| 23 BeginTokenWithComment, | 23 BeginTokenWithComment, |
| 24 CommentToken, | 24 CommentToken, |
| 25 Keyword, | 25 Keyword, |
| 26 KeywordToken, | 26 KeywordToken, |
| 27 KeywordTokenWithComment, | 27 KeywordTokenWithComment, |
| 28 StringToken, | 28 StringToken, |
| 29 StringTokenWithComment, | 29 StringTokenWithComment, |
| 30 Token, | 30 Token, |
| 31 TokenWithComment; | 31 TokenWithComment; |
| 32 | 32 |
| 33 import 'package:front_end/src/scanner/errors.dart' as analyzer | 33 import '../../scanner/errors.dart' as analyzer show ScannerErrorCode; |
| 34 show ScannerErrorCode; | |
| 35 | 34 |
| 36 import 'package:analyzer/dart/ast/token.dart' show TokenType; | 35 import 'package:analyzer/dart/ast/token.dart' show TokenType; |
| 37 | 36 |
| 38 import '../errors.dart' show internalError; | 37 import '../errors.dart' show internalError; |
| 39 | 38 |
| 40 /// Class capable of converting a stream of Fasta tokens to a stream of analyzer | 39 /// Class capable of converting a stream of Fasta tokens to a stream of analyzer |
| 41 /// tokens. | 40 /// tokens. |
| 42 /// | 41 /// |
| 43 /// This is a class rather than an ordinary method so that it can be subclassed | 42 /// This is a class rather than an ordinary method so that it can be subclassed |
| 44 /// in tests. | 43 /// in tests. |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 case PERIOD_PERIOD_PERIOD_TOKEN: | 764 case PERIOD_PERIOD_PERIOD_TOKEN: |
| 766 return TokenType.PERIOD_PERIOD_PERIOD; | 765 return TokenType.PERIOD_PERIOD_PERIOD; |
| 767 // case GENERIC_METHOD_TYPE_LIST_TOKEN: | 766 // case GENERIC_METHOD_TYPE_LIST_TOKEN: |
| 768 // return TokenType.GENERIC_METHOD_TYPE_LIST; | 767 // return TokenType.GENERIC_METHOD_TYPE_LIST; |
| 769 // case GENERIC_METHOD_TYPE_ASSIGN_TOKEN: | 768 // case GENERIC_METHOD_TYPE_ASSIGN_TOKEN: |
| 770 // return TokenType.GENERIC_METHOD_TYPE_ASSIGN; | 769 // return TokenType.GENERIC_METHOD_TYPE_ASSIGN; |
| 771 default: | 770 default: |
| 772 return internalError("Unhandled token ${token.info}"); | 771 return internalError("Unhandled token ${token.info}"); |
| 773 } | 772 } |
| 774 } | 773 } |
| OLD | NEW |