| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 status_expression; | 5 library test_dart_copy.status_expression; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Parse and evaluate expressions in a .status file for Dart and V8. | 8 * Parse and evaluate expressions in a .status file for Dart and V8. |
| 9 * There are set expressions and Boolean expressions in a .status file. | 9 * There are set expressions and Boolean expressions in a .status file. |
| 10 * The grammar is: | 10 * The grammar is: |
| 11 * BooleanExpression := $variableName == value | $variableName != value | | 11 * BooleanExpression := $variableName == value | $variableName != value | |
| 12 * $variableName | (BooleanExpression) | | 12 * $variableName | (BooleanExpression) | |
| 13 * BooleanExpression && BooleanExpression | | 13 * BooleanExpression && BooleanExpression | |
| 14 * BooleanExpression || BooleanExpression | 14 * BooleanExpression || BooleanExpression |
| 15 * | 15 * |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 "Expected value in expression, got ${scanner.current}"); | 305 "Expected value in expression, got ${scanner.current}"); |
| 306 } | 306 } |
| 307 TermConstant right = new TermConstant(scanner.current); | 307 TermConstant right = new TermConstant(scanner.current); |
| 308 scanner.advance(); | 308 scanner.advance(); |
| 309 return new Comparison(left, right, negate); | 309 return new Comparison(left, right, negate); |
| 310 } else { | 310 } else { |
| 311 return new BooleanVariable(left); | 311 return new BooleanVariable(left); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 } | 314 } |
| OLD | NEW |