| 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.ast_builder; | 5 library fasta.analyzer.ast_builder; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; | 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; |
| 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; | 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; |
| 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; | 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 typeParameters, | 1049 typeParameters, |
| 1050 extendsClause, | 1050 extendsClause, |
| 1051 withClause, | 1051 withClause, |
| 1052 implementsClause, | 1052 implementsClause, |
| 1053 toAnalyzerToken(body.beginToken), | 1053 toAnalyzerToken(body.beginToken), |
| 1054 body.members, | 1054 body.members, |
| 1055 toAnalyzerToken(body.endToken))); | 1055 toAnalyzerToken(body.endToken))); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 @override | 1058 @override |
| 1059 void endMixinApplication() { | 1059 void endMixinApplication(Token withKeyword) { |
| 1060 debugEvent("MixinApplication"); | 1060 debugEvent("MixinApplication"); |
| 1061 List<TypeName> mixinTypes = pop(); | 1061 List<TypeName> mixinTypes = pop(); |
| 1062 // TODO(paulberry,ahe): the parser doesn't give us enough information to | |
| 1063 // locate the "with" keyword. | |
| 1064 Token withKeyword; | |
| 1065 TypeName supertype = pop(); | 1062 TypeName supertype = pop(); |
| 1066 push(new _MixinApplication(supertype, withKeyword, mixinTypes)); | 1063 push(new _MixinApplication(supertype, withKeyword, mixinTypes)); |
| 1067 } | 1064 } |
| 1068 | 1065 |
| 1069 @override | 1066 @override |
| 1070 void endNamedMixinApplication(Token beginToken, Token classKeyword, | 1067 void endNamedMixinApplication(Token beginToken, Token classKeyword, |
| 1071 Token equalsToken, Token implementsKeyword, Token endToken) { | 1068 Token equalsToken, Token implementsKeyword, Token endToken) { |
| 1072 debugEvent("NamedMixinApplication"); | 1069 debugEvent("NamedMixinApplication"); |
| 1073 ImplementsClause implementsClause; | 1070 ImplementsClause implementsClause; |
| 1074 if (implementsKeyword != null) { | 1071 if (implementsKeyword != null) { |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 } else if (identical('static', s)) { | 1500 } else if (identical('static', s)) { |
| 1504 staticKeyword = token; | 1501 staticKeyword = token; |
| 1505 } else if (identical('var', s)) { | 1502 } else if (identical('var', s)) { |
| 1506 finalConstOrVarKeyword = token; | 1503 finalConstOrVarKeyword = token; |
| 1507 } else { | 1504 } else { |
| 1508 internalError('Unhandled modifier: $s'); | 1505 internalError('Unhandled modifier: $s'); |
| 1509 } | 1506 } |
| 1510 } | 1507 } |
| 1511 } | 1508 } |
| 1512 } | 1509 } |
| OLD | NEW |