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

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_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
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 library dart2js.semantics_visitor; 5 library dart2js.semantics_visitor;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../dart2jslib.dart' show invariant, MessageKind; 8 import '../dart2jslib.dart' show invariant, MessageKind;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 4038 matching lines...) Expand 10 before | Expand all | Expand 10 after
4049 /// m() => C(true, 42); 4049 /// m() => C(true, 42);
4050 /// 4050 ///
4051 R visitConstructorIncompatibleInvoke( 4051 R visitConstructorIncompatibleInvoke(
4052 NewExpression node, 4052 NewExpression node,
4053 ConstructorElement constructor, 4053 ConstructorElement constructor,
4054 InterfaceType type, 4054 InterfaceType type,
4055 NodeList arguments, 4055 NodeList arguments,
4056 CallStructure callStructure, 4056 CallStructure callStructure,
4057 A arg); 4057 A arg);
4058 4058
4059 /// Read access of an invalid expression.
4060 ///
4061 /// For instance
4062 /// import 'foo.dart' as p;
4063 ///
4064 /// m() => p;
4065 ///
4066 R errorInvalidGet(
4067 Send node,
4068 ErroneousElement error,
4069 A arg);
4070
4071
4072 /// Invocation of an invalid expression with [arguments].
4073 ///
4074 /// For instance
4075 /// import 'foo.dart' as p;
4076 ///
4077 /// m() => p(null, 42);
4078 ///
4079 R errorInvalidInvoke(
4080 Send node,
4081 ErroneousElement error,
4082 NodeList arguments,
4083 Selector selector,
4084 A arg);
4085
4086 /// Assignment of [rhs] to an invalid expression.
4087 ///
4088 /// For instance
4089 /// import 'foo.dart' as p;
4090 ///
4091 /// m() { p = 42; }
4092 ///
4093 R errorInvalidSet(
4094 Send node,
4095 ErroneousElement error,
4096 Node rhs,
4097 A arg);
4098
4099 /// Prefix operation on an invalid expression.
4100 ///
4101 /// For instance
4102 /// import 'foo.dart' as p;
4103 ///
4104 /// m() => ++p;
4105 ///
4106 R errorInvalidPrefix(
4107 Send node,
4108 ErroneousElement error,
4109 IncDecOperator operator,
4110 A arg);
4111
4112 /// Postfix operation on an invalid expression.
4113 ///
4114 /// For instance
4115 /// import 'foo.dart' as p;
4116 ///
4117 /// m() => p--;
4118 ///
4119 R errorInvalidPostfix(
4120 Send node,
4121 ErroneousElement error,
4122 IncDecOperator operator,
4123 A arg);
4124
4125 /// Compound assignment of [operator] with [rhs] on an invalid expression.
4126 ///
4127 /// For instance
4128 /// import 'foo.dart' as p;
4129 ///
4130 /// m() => p += 42;
4131 ///
4132 R errorInvalidCompound(
4133 Send node,
4134 ErroneousElement error,
4135 AssignmentOperator operator,
4136 Node rhs,
4137 A arg);
4138
4059 /// Access of library through a deferred [prefix]. 4139 /// Access of library through a deferred [prefix].
4060 /// 4140 ///
4061 /// For instance 4141 /// For instance
4062 /// import 'lib.dart' deferred as prefix; 4142 /// import 'lib.dart' deferred as prefix;
4063 /// 4143 ///
4064 /// m() => prefix.foo; 4144 /// m() => prefix.foo;
4065 /// 4145 ///
4066 /// This visit method is special in that it is called as a pre-step to calling 4146 /// This visit method is special in that it is called as a pre-step to calling
4067 /// the visit method for the actual access. Therefore this method cannot 4147 /// the visit method for the actual access. Therefore this method cannot
4068 /// return a result to its caller. 4148 /// return a result to its caller.
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
4634 /// C() : this._(42); 4714 /// C() : this._(42);
4635 /// } 4715 /// }
4636 /// 4716 ///
4637 R errorUnresolvedThisConstructorInvoke( 4717 R errorUnresolvedThisConstructorInvoke(
4638 Send node, 4718 Send node,
4639 Element element, 4719 Element element,
4640 NodeList arguments, 4720 NodeList arguments,
4641 Selector selector, 4721 Selector selector,
4642 A arg); 4722 A arg);
4643 } 4723 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698