Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 4118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4129 /// | 4129 /// |
| 4130 /// m() => p += 42; | 4130 /// m() => p += 42; |
| 4131 /// | 4131 /// |
| 4132 R errorInvalidCompound( | 4132 R errorInvalidCompound( |
| 4133 Send node, | 4133 Send node, |
| 4134 ErroneousElement error, | 4134 ErroneousElement error, |
| 4135 AssignmentOperator operator, | 4135 AssignmentOperator operator, |
| 4136 Node rhs, | 4136 Node rhs, |
| 4137 A arg); | 4137 A arg); |
| 4138 | 4138 |
| 4139 /// Unary operation with [operator] on an invalid expression. | |
| 4140 /// | |
| 4141 /// For instance | |
| 4142 /// m() => ~super; | |
|
floitsch
2015/07/31 12:30:37
why is this invalid?
Code samples should be inten
Johnni Winther
2015/07/31 13:38:29
It is top level. Changing the examples to be stati
Johnni Winther
2015/07/31 13:38:29
Done.
| |
| 4143 /// | |
| 4144 R errorInvalidUnary( | |
| 4145 Send node, | |
| 4146 UnaryOperator operator, | |
| 4147 ErroneousElement error, | |
| 4148 A arg); | |
| 4149 | |
| 4150 /// Equals operation on an invalid left expression. | |
| 4151 /// | |
| 4152 /// For instance | |
| 4153 /// m() => super == null; | |
| 4154 /// | |
| 4155 R errorInvalidEquals( | |
| 4156 Send node, | |
| 4157 ErroneousElement error, | |
| 4158 Node right, | |
| 4159 A arg); | |
| 4160 | |
| 4161 /// Not equals operation on an invalid left expression. | |
| 4162 /// | |
| 4163 /// For instance | |
| 4164 /// m() => super != null; | |
| 4165 /// | |
| 4166 R errorInvalidNotEquals( | |
| 4167 Send node, | |
| 4168 ErroneousElement error, | |
| 4169 Node right, | |
| 4170 A arg); | |
| 4171 | |
| 4172 /// Binary operation with [operator] on an invalid left expression. | |
| 4173 /// | |
| 4174 /// For instance | |
| 4175 /// m() => super + 0; | |
| 4176 /// | |
| 4177 R errorInvalidBinary( | |
| 4178 Send node, | |
| 4179 ErroneousElement error, | |
| 4180 BinaryOperator operator, | |
| 4181 Node right, | |
| 4182 A arg); | |
| 4183 | |
| 4184 /// Index operation on an invalid expression. | |
| 4185 /// | |
| 4186 /// For instance | |
| 4187 /// m() => super[0]; | |
| 4188 /// | |
| 4189 R errorInvalidIndex( | |
| 4190 Send node, | |
| 4191 ErroneousElement error, | |
| 4192 Node index, | |
| 4193 A arg); | |
| 4194 | |
| 4195 /// Index set operation on an invalid expression. | |
| 4196 /// | |
| 4197 /// For instance | |
| 4198 /// m() => super[0] = 42; | |
| 4199 /// | |
| 4200 R errorInvalidIndexSet( | |
| 4201 Send node, | |
| 4202 ErroneousElement error, | |
| 4203 Node index, | |
| 4204 Node rhs, | |
| 4205 A arg); | |
| 4206 | |
| 4207 /// Compound index set operation on an invalid expression. | |
| 4208 /// | |
| 4209 /// For instance | |
| 4210 /// m() => super[0] += 42; | |
| 4211 /// | |
| 4212 R errorInvalidCompoundIndexSet( | |
| 4213 Send node, | |
| 4214 ErroneousElement error, | |
| 4215 Node index, | |
| 4216 AssignmentOperator operator, | |
| 4217 Node rhs, | |
| 4218 A arg); | |
| 4219 | |
| 4220 /// Prefix index operation on an invalid expression. | |
| 4221 /// | |
| 4222 /// For instance | |
| 4223 /// m() => --super[0]; | |
| 4224 /// | |
| 4225 R errorInvalidIndexPrefix( | |
| 4226 Send node, | |
| 4227 ErroneousElement error, | |
| 4228 Node index, | |
| 4229 IncDecOperator operator, | |
| 4230 A arg); | |
| 4231 | |
| 4232 /// Postfix index operation on an invalid expression. | |
| 4233 /// | |
| 4234 /// For instance | |
| 4235 /// m() => super[0++; | |
| 4236 /// | |
| 4237 R errorInvalidIndexPostfix( | |
| 4238 Send node, | |
| 4239 ErroneousElement error, | |
| 4240 Node index, | |
| 4241 IncDecOperator operator, | |
| 4242 A arg); | |
| 4243 | |
| 4139 /// Access of library through a deferred [prefix]. | 4244 /// Access of library through a deferred [prefix]. |
| 4140 /// | 4245 /// |
| 4141 /// For instance | 4246 /// For instance |
| 4142 /// import 'lib.dart' deferred as prefix; | 4247 /// import 'lib.dart' deferred as prefix; |
| 4143 /// | 4248 /// |
| 4144 /// m() => prefix.foo; | 4249 /// m() => prefix.foo; |
| 4145 /// | 4250 /// |
| 4146 /// This visit method is special in that it is called as a pre-step to calling | 4251 /// This visit method is special in that it is called as a pre-step to calling |
| 4147 /// the visit method for the actual access. Therefore this method cannot | 4252 /// the visit method for the actual access. Therefore this method cannot |
| 4148 /// return a result to its caller. | 4253 /// return a result to its caller. |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4714 /// C() : this._(42); | 4819 /// C() : this._(42); |
| 4715 /// } | 4820 /// } |
| 4716 /// | 4821 /// |
| 4717 R errorUnresolvedThisConstructorInvoke( | 4822 R errorUnresolvedThisConstructorInvoke( |
| 4718 Send node, | 4823 Send node, |
| 4719 Element element, | 4824 Element element, |
| 4720 NodeList arguments, | 4825 NodeList arguments, |
| 4721 Selector selector, | 4826 Selector selector, |
| 4722 A arg); | 4827 A arg); |
| 4723 } | 4828 } |
| OLD | NEW |