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 dev_compiler.src.codegen.js_names; | 5 library dev_compiler.src.codegen.js_names; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import '../js/js_ast.dart'; | 9 import '../js/js_ast.dart'; |
10 | 10 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 case "implements": | 274 case "implements": |
275 case "interface": | 275 case "interface": |
276 case "let": | 276 case "let": |
277 case "package": | 277 case "package": |
278 case "private": | 278 case "private": |
279 case "protected": | 279 case "protected": |
280 case "public": | 280 case "public": |
281 case "static": | 281 case "static": |
282 case "yield": | 282 case "yield": |
283 return strictMode; | 283 return strictMode; |
284 | |
285 // Node refuses these: | |
Jennifer Messerly
2016/01/29 00:32:31
Any more info on these? What's the error message s
ochafik
2016/01/29 09:38:17
Dropped these, not needed now...
| |
286 case "async": | |
Jennifer Messerly
2016/01/29 00:32:31
this could be related to https://tc39.github.io/ec
ochafik
2016/01/29 09:38:17
My bad, now fixed (I had a weird collision of asyn
| |
287 case "dynamic": | |
288 case "void": | |
Jennifer Messerly
2016/01/29 00:32:31
it looks like "void" is already covered, above? So
ochafik
2016/01/29 09:38:17
Done.
| |
289 return true; | |
284 } | 290 } |
285 return false; | 291 return false; |
286 } | 292 } |
287 | 293 |
288 /// Returns true for invalid static field names in strict mode. | 294 /// Returns true for invalid static field names in strict mode. |
289 /// In particular, "caller" "callee" and "arguments" cannot be used. | 295 /// In particular, "caller" "callee" and "arguments" cannot be used. |
290 bool invalidStaticFieldName(String name) { | 296 bool invalidStaticFieldName(String name) { |
291 switch (name) { | 297 switch (name) { |
292 case "arguments": | 298 case "arguments": |
293 case "caller": | 299 case "caller": |
294 case "callee": | 300 case "callee": |
295 return true; | 301 return true; |
296 } | 302 } |
297 return false; | 303 return false; |
298 } | 304 } |
OLD | NEW |