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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 void endTypeArguments(int count, Token beginToken, Token endToken) { | 621 void endTypeArguments(int count, Token beginToken, Token endToken) { |
622 logEvent("TypeArguments"); | 622 logEvent("TypeArguments"); |
623 } | 623 } |
624 | 624 |
625 void handleNoTypeArguments(Token token) { | 625 void handleNoTypeArguments(Token token) { |
626 logEvent("NoTypeArguments"); | 626 logEvent("NoTypeArguments"); |
627 } | 627 } |
628 | 628 |
629 void beginTypeVariable(Token token) {} | 629 void beginTypeVariable(Token token) {} |
630 | 630 |
| 631 /// Handle the end of a type formal parameter (e.g. "X extends Y"). |
| 632 /// Substructures: |
| 633 /// - Name (identifier) |
| 634 /// - Type bound |
631 void endTypeVariable(Token token, Token extendsOrSuper) { | 635 void endTypeVariable(Token token, Token extendsOrSuper) { |
632 logEvent("TypeVariable"); | 636 logEvent("TypeVariable"); |
633 } | 637 } |
634 | 638 |
635 void beginTypeVariables(Token token) {} | 639 void beginTypeVariables(Token token) {} |
636 | 640 |
637 void endTypeVariables(int count, Token beginToken, Token endToken) { | 641 void endTypeVariables(int count, Token beginToken, Token endToken) { |
638 logEvent("TypeVariables"); | 642 logEvent("TypeVariables"); |
639 } | 643 } |
640 | 644 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 | 892 |
889 final Map arguments; | 893 final Map arguments; |
890 | 894 |
891 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); | 895 ParserError(this.beginOffset, this.endOffset, this.kind, this.arguments); |
892 | 896 |
893 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) | 897 ParserError.fromTokens(Token begin, Token end, ErrorKind kind, Map arguments) |
894 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); | 898 : this(begin.charOffset, end.charOffset + end.charCount, kind, arguments); |
895 | 899 |
896 String toString() => "@${beginOffset}: $kind $arguments"; | 900 String toString() => "@${beginOffset}: $kind $arguments"; |
897 } | 901 } |
OLD | NEW |