| 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 BeginToken, Token, TokenType; | 7 import '../../scanner/token.dart' show Token, TokenType; |
| 8 | 8 |
| 9 import '../fasta_codes.dart' show Message; | 9 import '../fasta_codes.dart' show Message; |
| 10 | 10 |
| 11 import '../util/link.dart' show Link; | 11 import '../util/link.dart' show Link; |
| 12 | 12 |
| 13 import 'assert.dart' show Assert; | 13 import 'assert.dart' show Assert; |
| 14 | 14 |
| 15 import 'formal_parameter_kind.dart' show FormalParameterKind; | 15 import 'formal_parameter_kind.dart' show FormalParameterKind; |
| 16 | 16 |
| 17 import 'identifier_context.dart' show IdentifierContext; | 17 import 'identifier_context.dart' show IdentifierContext; |
| (...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 | 979 |
| 980 void handleSymbolVoid(Token token) { | 980 void handleSymbolVoid(Token token) { |
| 981 logEvent("SymbolVoid"); | 981 logEvent("SymbolVoid"); |
| 982 } | 982 } |
| 983 | 983 |
| 984 /// Handle the end of a construct of the form "operator <token>". | 984 /// Handle the end of a construct of the form "operator <token>". |
| 985 void handleOperatorName(Token operatorKeyword, Token token) { | 985 void handleOperatorName(Token operatorKeyword, Token token) { |
| 986 logEvent("OperatorName"); | 986 logEvent("OperatorName"); |
| 987 } | 987 } |
| 988 | 988 |
| 989 void handleParenthesizedExpression(BeginToken token) { | 989 void handleParenthesizedExpression(Token token) { |
| 990 logEvent("ParenthesizedExpression"); | 990 logEvent("ParenthesizedExpression"); |
| 991 } | 991 } |
| 992 | 992 |
| 993 /// Handle a construct of the form "identifier.identifier" occurring in a part | 993 /// Handle a construct of the form "identifier.identifier" occurring in a part |
| 994 /// of the grammar where expressions in general are not allowed. | 994 /// of the grammar where expressions in general are not allowed. |
| 995 /// Substructures: | 995 /// Substructures: |
| 996 /// - Qualified identifier (before the period) | 996 /// - Qualified identifier (before the period) |
| 997 /// - Identifier (after the period) | 997 /// - Identifier (after the period) |
| 998 void handleQualified(Token period) { | 998 void handleQualified(Token period) { |
| 999 logEvent("Qualified"); | 999 logEvent("Qualified"); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 void discardTypeReplacedWithCommentTypeAssign() {} | 1101 void discardTypeReplacedWithCommentTypeAssign() {} |
| 1102 | 1102 |
| 1103 /// Creates a new synthetic token whose `next` pointer points to [next]. | 1103 /// Creates a new synthetic token whose `next` pointer points to [next]. |
| 1104 /// | 1104 /// |
| 1105 /// If [next] is `null`, `null` is returned. | 1105 /// If [next] is `null`, `null` is returned. |
| 1106 Token newSyntheticToken(Token next) { | 1106 Token newSyntheticToken(Token next) { |
| 1107 if (next == null) return null; | 1107 if (next == null) return null; |
| 1108 return new Token(TokenType.RECOVERY, next.charOffset)..next = next; | 1108 return new Token(TokenType.RECOVERY, next.charOffset)..next = next; |
| 1109 } | 1109 } |
| 1110 } | 1110 } |
| OLD | NEW |