| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 String contName = tokens.read("return"); | 307 String contName = tokens.read("return"); |
| 308 Continuation cont = name2variable[contName]; | 308 Continuation cont = name2variable[contName]; |
| 309 assert(cont != null); | 309 assert(cont != null); |
| 310 tokens.consumeEnd(); | 310 tokens.consumeEnd(); |
| 311 | 311 |
| 312 // body | 312 // body |
| 313 Expression body = parseExpression(); | 313 Expression body = parseExpression(); |
| 314 | 314 |
| 315 tokens.consumeEnd(); | 315 tokens.consumeEnd(); |
| 316 return new FunctionDefinition(element, cont, parameters, body, null, null, | 316 return new FunctionDefinition(element, parameters, |
| 317 new RunnableBody(body, cont), null, null, |
| 317 closureVariables); | 318 closureVariables); |
| 318 } | 319 } |
| 319 | 320 |
| 320 /// (IsTrue arg) | 321 /// (IsTrue arg) |
| 321 Condition parseCondition() { | 322 Condition parseCondition() { |
| 322 // Handles IsTrue only for now. | 323 // Handles IsTrue only for now. |
| 323 tokens.consumeStart(IS_TRUE); | 324 tokens.consumeStart(IS_TRUE); |
| 324 | 325 |
| 325 Definition value = name2variable[tokens.read()]; | 326 Definition value = name2variable[tokens.read()]; |
| 326 assert(value != null); | 327 assert(value != null); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 return new ReifyTypeVar(type); | 704 return new ReifyTypeVar(type); |
| 704 } | 705 } |
| 705 | 706 |
| 706 /// (This) | 707 /// (This) |
| 707 This parseThis() { | 708 This parseThis() { |
| 708 tokens.consumeStart(THIS); | 709 tokens.consumeStart(THIS); |
| 709 tokens.consumeEnd(); | 710 tokens.consumeEnd(); |
| 710 return new This(); | 711 return new This(); |
| 711 } | 712 } |
| 712 } | 713 } |
| OLD | NEW |