| 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 /// (CreateFunction (definition)) | 705 /// (CreateFunction (definition)) |
| 706 CreateFunction parseCreateFunction() { | 706 CreateFunction parseCreateFunction() { |
| 707 tokens.consumeStart(CREATE_FUNCTION); | 707 tokens.consumeStart(CREATE_FUNCTION); |
| 708 FunctionDefinition def = parseFunctionDefinition(); | 708 FunctionDefinition def = parseFunctionDefinition(); |
| 709 tokens.consumeEnd(); | 709 tokens.consumeEnd(); |
| 710 return new CreateFunction(def); | 710 return new CreateFunction(def); |
| 711 } | 711 } |
| 712 | 712 |
| 713 MutableVariable addMutableVariable(String name) { | 713 MutableVariable addMutableVariable(String name) { |
| 714 assert(!name2variable.containsKey(name)); | 714 assert(!name2variable.containsKey(name)); |
| 715 MutableVariable variable = | 715 MutableVariable variable = new MutableVariable(new DummyElement(name)); |
| 716 new MutableVariable(new DummyElement(""), new DummyElement(name)); | |
| 717 name2variable[name] = variable; | 716 name2variable[name] = variable; |
| 718 return variable; | 717 return variable; |
| 719 } | 718 } |
| 720 | 719 |
| 721 /// (GetMutableVariable name) | 720 /// (GetMutableVariable name) |
| 722 GetMutableVariable parseGetMutableVariable() { | 721 GetMutableVariable parseGetMutableVariable() { |
| 723 tokens.consumeStart(GET_MUTABLE_VARIABLE); | 722 tokens.consumeStart(GET_MUTABLE_VARIABLE); |
| 724 MutableVariable local = name2variable[tokens.read()]; | 723 MutableVariable local = name2variable[tokens.read()]; |
| 725 tokens.consumeEnd(); | 724 tokens.consumeEnd(); |
| 726 | 725 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 /// (GetStatic field) | 763 /// (GetStatic field) |
| 765 GetStatic parseGetStatic() { | 764 GetStatic parseGetStatic() { |
| 766 tokens.consumeStart(GET_STATIC); | 765 tokens.consumeStart(GET_STATIC); |
| 767 | 766 |
| 768 Element field = new DummyElement(tokens.read()); | 767 Element field = new DummyElement(tokens.read()); |
| 769 | 768 |
| 770 tokens.consumeEnd(); | 769 tokens.consumeEnd(); |
| 771 return new GetStatic(field, null); | 770 return new GetStatic(field, null); |
| 772 } | 771 } |
| 773 } | 772 } |
| OLD | NEW |