| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // continuation | 311 // continuation |
| 312 String contName = tokens.read("return"); | 312 String contName = tokens.read("return"); |
| 313 Continuation cont = name2variable[contName]; | 313 Continuation cont = name2variable[contName]; |
| 314 assert(cont != null); | 314 assert(cont != null); |
| 315 | 315 |
| 316 // body | 316 // body |
| 317 Expression body = parseExpression(); | 317 Expression body = parseExpression(); |
| 318 | 318 |
| 319 tokens.consumeEnd(); | 319 tokens.consumeEnd(); |
| 320 return new FunctionDefinition(element, thisParameter, parameters, | 320 return new FunctionDefinition(element, thisParameter, parameters, |
| 321 new RunnableBody(body, cont), null, null); | 321 new Body(body, cont), null, null); |
| 322 } | 322 } |
| 323 | 323 |
| 324 /// (IsTrue arg) | 324 /// (IsTrue arg) |
| 325 Condition parseCondition() { | 325 Condition parseCondition() { |
| 326 // Handles IsTrue only for now. | 326 // Handles IsTrue only for now. |
| 327 tokens.consumeStart(IS_TRUE); | 327 tokens.consumeStart(IS_TRUE); |
| 328 | 328 |
| 329 Definition value = name2variable[tokens.read()]; | 329 Definition value = name2variable[tokens.read()]; |
| 330 assert(value != null); | 330 assert(value != null); |
| 331 | 331 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 return new ReifyTypeVar(type); | 730 return new ReifyTypeVar(type); |
| 731 } | 731 } |
| 732 | 732 |
| 733 /// (This) | 733 /// (This) |
| 734 This parseThis() { | 734 This parseThis() { |
| 735 tokens.consumeStart(THIS); | 735 tokens.consumeStart(THIS); |
| 736 tokens.consumeEnd(); | 736 tokens.consumeEnd(); |
| 737 return new This(); | 737 return new This(); |
| 738 } | 738 } |
| 739 } | 739 } |
| OLD | NEW |