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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 void handleNoFormalParameters(Token token) { | 172 void handleNoFormalParameters(Token token) { |
173 logEvent("NoFormalParameters"); | 173 logEvent("NoFormalParameters"); |
174 } | 174 } |
175 | 175 |
176 void beginFormalParameters(Token token) {} | 176 void beginFormalParameters(Token token) {} |
177 | 177 |
178 void endFormalParameters(int count, Token beginToken, Token endToken) { | 178 void endFormalParameters(int count, Token beginToken, Token endToken) { |
179 logEvent("FormalParameters"); | 179 logEvent("FormalParameters"); |
180 } | 180 } |
181 | 181 |
| 182 /// Handle the end of a field declaration. Substructures: |
| 183 /// - Metadata |
| 184 /// - Modifiers |
| 185 /// - Type |
| 186 /// - Variable declarations (count times) |
| 187 /// |
182 /// Doesn't have a corresponding begin event, use [beginMember] instead. | 188 /// Doesn't have a corresponding begin event, use [beginMember] instead. |
183 void endFields(int count, Token beginToken, Token endToken) { | 189 void endFields( |
| 190 int count, Token covariantKeyword, Token beginToken, Token endToken) { |
184 logEvent("Fields"); | 191 logEvent("Fields"); |
185 } | 192 } |
186 | 193 |
187 void beginForStatement(Token token) {} | 194 void beginForStatement(Token token) {} |
188 | 195 |
189 void endForStatement( | 196 void endForStatement( |
190 int updateExpressionCount, Token beginToken, Token endToken) { | 197 int updateExpressionCount, Token beginToken, Token endToken) { |
191 logEvent("ForStatement"); | 198 logEvent("ForStatement"); |
192 } | 199 } |
193 | 200 |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 966 |
960 final Map arguments; | 967 final Map arguments; |
961 | 968 |
962 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); | 969 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); |
963 | 970 |
964 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) | 971 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) |
965 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); | 972 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); |
966 | 973 |
967 String toString() => "@${beginOffset}: $kind $arguments"; | 974 String toString() => "@${beginOffset}: $kind $arguments"; |
968 } | 975 } |
OLD | NEW |