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' show Token, TokenType; | 10 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType; |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 if (catchParameters.length > 1) { | 985 if (catchParameters.length > 1) { |
986 stackTrace = catchParameters[1].identifier; | 986 stackTrace = catchParameters[1].identifier; |
987 } | 987 } |
988 } | 988 } |
989 push(ast.catchClause( | 989 push(ast.catchClause( |
990 onKeyword, | 990 onKeyword, |
991 type, | 991 type, |
992 catchKeyword, | 992 catchKeyword, |
993 catchParameterList?.leftParenthesis, | 993 catchParameterList?.leftParenthesis, |
994 exception, | 994 exception, |
995 null, | 995 stackTrace == null ? null : stackTrace.token.previous, |
996 stackTrace, | 996 stackTrace, |
997 catchParameterList?.rightParenthesis, | 997 catchParameterList?.rightParenthesis, |
998 body)); | 998 body)); |
999 } | 999 } |
1000 | 1000 |
1001 @override | 1001 @override |
1002 void handleFinallyBlock(Token finallyKeyword) { | 1002 void handleFinallyBlock(Token finallyKeyword) { |
1003 debugEvent("FinallyBlock"); | 1003 debugEvent("FinallyBlock"); |
1004 // The finally block is popped in "endTryStatement". | 1004 // The finally block is popped in "endTryStatement". |
1005 } | 1005 } |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 } else if (identical('var', s)) { | 2055 } else if (identical('var', s)) { |
2056 finalConstOrVarKeyword = token; | 2056 finalConstOrVarKeyword = token; |
2057 } else if (identical('covariant', s)) { | 2057 } else if (identical('covariant', s)) { |
2058 covariantKeyword = token; | 2058 covariantKeyword = token; |
2059 } else { | 2059 } else { |
2060 unhandled("$s", "modifier", token.charOffset, null); | 2060 unhandled("$s", "modifier", token.charOffset, null); |
2061 } | 2061 } |
2062 } | 2062 } |
2063 } | 2063 } |
2064 } | 2064 } |
OLD | NEW |