Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart

Issue 1261623002: Add AccessSemantics.INVALID for invalid expressions. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test_send_data.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 part of dart2js.semantics_visitor_test; 5 part of dart2js.semantics_visitor_test;
6 6
7 class SemanticSendTestVisitor extends SemanticTestVisitor { 7 class SemanticSendTestVisitor extends SemanticTestVisitor {
8 8
9 SemanticSendTestVisitor(TreeElements elements) : super(elements); 9 SemanticSendTestVisitor(TreeElements elements) : super(elements);
10 10
(...skipping 20 matching lines...) Expand all
31 @override 31 @override
32 errorInvalidAssert( 32 errorInvalidAssert(
33 Send node, 33 Send node,
34 NodeList arguments, 34 NodeList arguments,
35 arg) { 35 arg) {
36 visits.add(new Visit(VisitKind.ERROR_INVALID_ASSERT, arguments: arguments)); 36 visits.add(new Visit(VisitKind.ERROR_INVALID_ASSERT, arguments: arguments));
37 super.errorInvalidAssert(node, arguments, arg); 37 super.errorInvalidAssert(node, arguments, arg);
38 } 38 }
39 39
40 @override 40 @override
41 errorInvalidCompound(
42 Send node,
43 ErroneousElement error,
44 AssignmentOperator operator,
45 Node rhs,
46 arg) {
47 visits.add(new Visit(VisitKind.ERROR_INVALID_COMPOUND,
48 error: error.messageKind, operator: operator, rhs: rhs));
49 super.errorInvalidCompound(node, error, operator, rhs, arg);
50 }
51
52 @override
53 errorInvalidGet(
54 Send node,
55 ErroneousElement error,
56 arg) {
57 visits.add(new Visit(VisitKind.ERROR_INVALID_GET,
58 error: error.messageKind));
59 super.errorInvalidGet(node, error, arg);
60 }
61
62 @override
63 errorInvalidInvoke(
64 Send node,
65 ErroneousElement error,
66 NodeList arguments,
67 Selector selector,
68 arg) {
69 visits.add(new Visit(VisitKind.ERROR_INVALID_INVOKE,
70 error: error.messageKind, arguments: arguments));
71 super.errorInvalidInvoke(node, error, arguments, selector, arg);
72 }
73
74 @override
75 errorInvalidPostfix(
76 Send node,
77 ErroneousElement error,
78 IncDecOperator operator,
79 arg) {
80 visits.add(new Visit(VisitKind.ERROR_INVALID_POSTFIX,
81 error: error.messageKind, operator: operator));
82 super.errorInvalidPostfix(node, error, operator, arg);
83 }
84
85 @override
86 errorInvalidPrefix(
87 Send node,
88 ErroneousElement error,
89 IncDecOperator operator,
90 arg) {
91 visits.add(new Visit(VisitKind.ERROR_INVALID_PREFIX,
92 error: error.messageKind, operator: operator));
93 super.errorInvalidPrefix(node, error, operator, arg);
94 }
95
96 @override
97 errorInvalidSet(
98 Send node,
99 ErroneousElement error,
100 Node rhs,
101 arg) {
102 visits.add(new Visit(VisitKind.ERROR_INVALID_SET,
103 error: error.messageKind, rhs: rhs));
104 super.errorInvalidSet(node, error, rhs, arg);
105 }
106
107 @override
41 visitBinary( 108 visitBinary(
42 Send node, 109 Send node,
43 Node left, 110 Node left,
44 BinaryOperator operator, 111 BinaryOperator operator,
45 Node right, 112 Node right,
46 arg) { 113 arg) {
47 visits.add(new Visit(VisitKind.VISIT_BINARY, 114 visits.add(new Visit(VisitKind.VISIT_BINARY,
48 left: left, operator: operator, right: right)); 115 left: left, operator: operator, right: right));
49 super.visitBinary(node, left, operator, right, arg); 116 super.visitBinary(node, left, operator, right, arg);
50 } 117 }
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2942 } 3009 }
2943 3010
2944 @override 3011 @override
2945 previsitDeferredAccess( 3012 previsitDeferredAccess(
2946 Send node, 3013 Send node,
2947 PrefixElement prefix, 3014 PrefixElement prefix,
2948 arg) { 3015 arg) {
2949 visits.add(new Visit(VisitKind.PREVISIT_DEFERRED_ACCESS, element: prefix)); 3016 visits.add(new Visit(VisitKind.PREVISIT_DEFERRED_ACCESS, element: prefix));
2950 } 3017 }
2951 } 3018 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test_send_data.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698