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 library fasta.parser.listener; | 5 library fasta.parser.listener; |
6 | 6 |
7 import '../scanner/token.dart' show BeginGroupToken, Token; | 7 import '../scanner/token.dart' show BeginGroupToken, Token; |
8 | 8 |
9 import '../util/link.dart' show Link; | 9 import '../util/link.dart' show Link; |
10 | 10 |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 } | 847 } |
848 | 848 |
849 void handleNoTypeVariables(Token token) { | 849 void handleNoTypeVariables(Token token) { |
850 logEvent("NoTypeVariables"); | 850 logEvent("NoTypeVariables"); |
851 } | 851 } |
852 | 852 |
853 void handleOperator(Token token) { | 853 void handleOperator(Token token) { |
854 logEvent("Operator"); | 854 logEvent("Operator"); |
855 } | 855 } |
856 | 856 |
| 857 /// Handle the end of a construct of the form "operator <token>". |
857 void handleOperatorName(Token operatorKeyword, Token token) { | 858 void handleOperatorName(Token operatorKeyword, Token token) { |
858 logEvent("OperatorName"); | 859 logEvent("OperatorName"); |
859 } | 860 } |
860 | 861 |
861 void handleParenthesizedExpression(BeginGroupToken token) { | 862 void handleParenthesizedExpression(BeginGroupToken token) { |
862 logEvent("ParenthesizedExpression"); | 863 logEvent("ParenthesizedExpression"); |
863 } | 864 } |
864 | 865 |
865 /// Handle a construct of the form "identifier.identifier" occurring in a part | 866 /// Handle a construct of the form "identifier.identifier" occurring in a part |
866 /// of the grammar where expressions in general are not allowed. | 867 /// of the grammar where expressions in general are not allowed. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 | 959 |
959 final Map arguments; | 960 final Map arguments; |
960 | 961 |
961 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); | 962 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); |
962 | 963 |
963 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) | 964 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) |
964 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); | 965 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); |
965 | 966 |
966 String toString() => "@${beginOffset}: $kind $arguments"; | 967 String toString() => "@${beginOffset}: $kind $arguments"; |
967 } | 968 } |
OLD | NEW |