| 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 import 'dart:collection' show IterableMixin; | 5 import 'dart:collection' show IterableMixin; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../tokens/precedence_constants.dart' as Precedence show FUNCTION_INFO; | 8 import '../tokens/precedence_constants.dart' as Precedence show FUNCTION_INFO; |
| 9 import '../tokens/token.dart' show BeginGroupToken, Token; | 9 import '../tokens/token.dart' show BeginGroupToken, Token; |
| 10 import '../tokens/token_constants.dart' as Tokens | 10 import '../tokens/token_constants.dart' as Tokens |
| (...skipping 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2969 this.type, this.formals, this.block, this.onKeyword, this.catchKeyword); | 2969 this.type, this.formals, this.block, this.onKeyword, this.catchKeyword); |
| 2970 | 2970 |
| 2971 CatchBlock asCatchBlock() => this; | 2971 CatchBlock asCatchBlock() => this; |
| 2972 | 2972 |
| 2973 accept(Visitor visitor) => visitor.visitCatchBlock(this); | 2973 accept(Visitor visitor) => visitor.visitCatchBlock(this); |
| 2974 | 2974 |
| 2975 accept1(Visitor1 visitor, arg) => visitor.visitCatchBlock(this, arg); | 2975 accept1(Visitor1 visitor, arg) => visitor.visitCatchBlock(this, arg); |
| 2976 | 2976 |
| 2977 Node get exception { | 2977 Node get exception { |
| 2978 if (formals == null || formals.nodes.isEmpty) return null; | 2978 if (formals == null || formals.nodes.isEmpty) return null; |
| 2979 VariableDefinitions declarations = formals.nodes.head; | 2979 VariableDefinitions declarations = |
| 2980 return declarations.definitions.nodes.head; | 2980 formals.nodes.head.asVariableDefinitions(); |
| 2981 return declarations?.definitions?.nodes?.head; |
| 2981 } | 2982 } |
| 2982 | 2983 |
| 2983 Node get trace { | 2984 Node get trace { |
| 2984 if (formals == null || formals.nodes.isEmpty) return null; | 2985 if (formals == null || formals.nodes.isEmpty) return null; |
| 2985 Link<Node> declarations = formals.nodes.tail; | 2986 Link<Node> declarations = formals.nodes.tail; |
| 2986 if (declarations.isEmpty) return null; | 2987 if (declarations.isEmpty) return null; |
| 2987 VariableDefinitions head = declarations.head; | 2988 VariableDefinitions head = declarations.head.asVariableDefinitions(); |
| 2988 return head.definitions.nodes.head; | 2989 return head?.definitions?.nodes?.head; |
| 2989 } | 2990 } |
| 2990 | 2991 |
| 2991 visitChildren(Visitor visitor) { | 2992 visitChildren(Visitor visitor) { |
| 2992 if (type != null) type.accept(visitor); | 2993 if (type != null) type.accept(visitor); |
| 2993 if (formals != null) formals.accept(visitor); | 2994 if (formals != null) formals.accept(visitor); |
| 2994 block.accept(visitor); | 2995 block.accept(visitor); |
| 2995 } | 2996 } |
| 2996 | 2997 |
| 2997 visitChildren1(Visitor1 visitor, arg) { | 2998 visitChildren1(Visitor1 visitor, arg) { |
| 2998 if (type != null) type.accept1(visitor, arg); | 2999 if (type != null) type.accept1(visitor, arg); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3114 | 3115 |
| 3115 // VariableDefinitions. | 3116 // VariableDefinitions. |
| 3116 get metadata => null; | 3117 get metadata => null; |
| 3117 get type => null; | 3118 get type => null; |
| 3118 | 3119 |
| 3119 // Typedef. | 3120 // Typedef. |
| 3120 get typeParameters => null; | 3121 get typeParameters => null; |
| 3121 get formals => null; | 3122 get formals => null; |
| 3122 get typedefKeyword => null; | 3123 get typedefKeyword => null; |
| 3123 } | 3124 } |
| OLD | NEW |