| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // SExpressionUnstringifier implements the inverse operation to | 5 // SExpressionUnstringifier implements the inverse operation to |
| 6 // [SExpressionStringifier]. | 6 // [SExpressionStringifier]. |
| 7 | 7 |
| 8 library sexpr_unstringifier; | 8 library sexpr_unstringifier; |
| 9 | 9 |
| 10 import 'package:compiler/src/constants/expressions.dart' | 10 import 'package:compiler/src/constants/expressions.dart' |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 dart_types.DartType type = new DummyNamedType(split[0]); | 364 dart_types.DartType type = new DummyNamedType(split[0]); |
| 365 Element element = new DummyElement((split.length == 1) ? "" : split[1]); | 365 Element element = new DummyElement((split.length == 1) ? "" : split[1]); |
| 366 | 366 |
| 367 List<Primitive> args = parsePrimitiveList(); | 367 List<Primitive> args = parsePrimitiveList(); |
| 368 | 368 |
| 369 Continuation cont = name2variable[tokens.read()]; | 369 Continuation cont = name2variable[tokens.read()]; |
| 370 assert(cont != null); | 370 assert(cont != null); |
| 371 | 371 |
| 372 tokens.consumeEnd(); | 372 tokens.consumeEnd(); |
| 373 Selector selector = dummySelector(constructorName, args.length); | 373 Selector selector = dummySelector(constructorName, args.length); |
| 374 return new InvokeConstructor(type, element, selector, cont, args); | 374 return new InvokeConstructor.byType(type, element, selector, cont, args); |
| 375 } | 375 } |
| 376 | 376 |
| 377 /// (InvokeContinuation rec? name (args)) | 377 /// (InvokeContinuation rec? name (args)) |
| 378 InvokeContinuation parseInvokeContinuation() { | 378 InvokeContinuation parseInvokeContinuation() { |
| 379 tokens.consumeStart(INVOKE_CONTINUATION); | 379 tokens.consumeStart(INVOKE_CONTINUATION); |
| 380 String name = tokens.read(); | 380 String name = tokens.read(); |
| 381 bool isRecursive = name == "rec"; | 381 bool isRecursive = name == "rec"; |
| 382 if (isRecursive) name = tokens.read(); | 382 if (isRecursive) name = tokens.read(); |
| 383 | 383 |
| 384 Continuation cont = name2variable[name]; | 384 Continuation cont = name2variable[name]; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 return new ReifyTypeVar(type); | 705 return new ReifyTypeVar(type); |
| 706 } | 706 } |
| 707 | 707 |
| 708 /// (This) | 708 /// (This) |
| 709 This parseThis() { | 709 This parseThis() { |
| 710 tokens.consumeStart(THIS); | 710 tokens.consumeStart(THIS); |
| 711 tokens.consumeEnd(); | 711 tokens.consumeEnd(); |
| 712 return new This(); | 712 return new This(); |
| 713 } | 713 } |
| 714 } | 714 } |
| OLD | NEW |