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.verifier; | 5 library fasta.verifier; |
6 | 6 |
7 import 'package:kernel/ast.dart' | 7 import 'package:kernel/ast.dart' |
8 show | 8 show |
9 InvalidExpression, | 9 InvalidExpression, |
10 InvalidStatement, | 10 InvalidStatement, |
(...skipping 24 matching lines...) Expand all Loading... |
35 final List<VerificationError> errors = <VerificationError>[]; | 35 final List<VerificationError> errors = <VerificationError>[]; |
36 | 36 |
37 String fileUri; | 37 String fileUri; |
38 | 38 |
39 FastaVerifyingVisitor(bool isOutline) { | 39 FastaVerifyingVisitor(bool isOutline) { |
40 this.isOutline = isOutline; | 40 this.isOutline = isOutline; |
41 } | 41 } |
42 | 42 |
43 @override | 43 @override |
44 problem(TreeNode node, String details) { | 44 problem(TreeNode node, String details) { |
45 // TODO(karlklose): Remove this when underlying problem is fixed. | |
46 if (details.startsWith("Type parameter 'dart.collection::MapView::")) { | |
47 return; | |
48 } | |
49 VerificationError error = new VerificationError(context, node, details); | 45 VerificationError error = new VerificationError(context, node, details); |
50 printUnexpected(Uri.parse(fileUri), node.fileOffset, "$error"); | 46 printUnexpected(Uri.parse(fileUri), node.fileOffset, "$error"); |
51 errors.add(error); | 47 errors.add(error); |
52 } | 48 } |
53 | 49 |
54 @override | 50 @override |
55 visitExpressionStatement(ExpressionStatement node) { | 51 visitExpressionStatement(ExpressionStatement node) { |
56 // Bypass verification of the [StaticGet] in [RedirectingFactoryBody] as | 52 // Bypass verification of the [StaticGet] in [RedirectingFactoryBody] as |
57 // this is a static get without a getter. | 53 // this is a static get without a getter. |
58 if (node is! RedirectingFactoryBody) { | 54 if (node is! RedirectingFactoryBody) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 @override | 88 @override |
93 visitInvalidStatement(InvalidStatement node) { | 89 visitInvalidStatement(InvalidStatement node) { |
94 problem(node, "Invalid statement."); | 90 problem(node, "Invalid statement."); |
95 } | 91 } |
96 | 92 |
97 @override | 93 @override |
98 visitInvalidInitializer(InvalidInitializer node) { | 94 visitInvalidInitializer(InvalidInitializer node) { |
99 problem(node, "Invalid initializer."); | 95 problem(node, "Invalid initializer."); |
100 } | 96 } |
101 } | 97 } |
OLD | NEW |