| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.constant; | 3 library engine.constant; |
| 4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
| 5 import 'source.dart' show Source; | 5 import 'source.dart' show Source; |
| 6 import 'error.dart' show AnalysisError, ErrorCode, CompileTimeErrorCode; | 6 import 'error.dart' show AnalysisError, ErrorCode, CompileTimeErrorCode; |
| 7 import 'scanner.dart' show TokenType; | 7 import 'scanner.dart' show TokenType; |
| 8 import 'ast.dart'; | 8 import 'ast.dart'; |
| 9 import 'element.dart'; | 9 import 'element.dart'; |
| 10 import 'engine.dart' show AnalysisEngine; | 10 import 'engine.dart' show AnalysisEngine; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 * * An expression of one of the forms `~e`, `e1 ^ e2`, `e1 & e2`, | 285 * * An expression of one of the forms `~e`, `e1 ^ e2`, `e1 & e2`, |
| 286 * `e1 | e2`, `e1 >> e2` or `e1 << e2`, where `e`, `e1` and `e2` | 286 * `e1 | e2`, `e1 >> e2` or `e1 << e2`, where `e`, `e1` and `e2` |
| 287 * are constant expressions that evaluate to an integer value or to `null`. | 287 * are constant expressions that evaluate to an integer value or to `null`. |
| 288 * * An expression of one of the forms `-e`, `e1 + e2`, `e1 - e2`, | 288 * * An expression of one of the forms `-e`, `e1 + e2`, `e1 - e2`, |
| 289 * `e1 * e2`, `e1 / e2`, `e1 ~/ e2`, `e1 > e2`, `e1 < e2`, | 289 * `e1 * e2`, `e1 / e2`, `e1 ~/ e2`, `e1 > e2`, `e1 < e2`, |
| 290 * `e1 >= e2`, `e1 <= e2` or `e1 % e2`, where `e`, `e1` and `e2` | 290 * `e1 >= e2`, `e1 <= e2` or `e1 % e2`, where `e`, `e1` and `e2` |
| 291 * are constant expressions that evaluate to a numeric value or to `null`. | 291 * are constant expressions that evaluate to a numeric value or to `null`. |
| 292 * | 292 * |
| 293 * </blockquote> | 293 * </blockquote> |
| 294 */ | 294 */ |
| 295 class ConstantVisitor extends GeneralizingASTVisitor<EvaluationResultImpl> { | 295 class ConstantVisitor extends UnifyingASTVisitor<EvaluationResultImpl> { |
| 296 EvaluationResultImpl visitAdjacentStrings(AdjacentStrings node) { | 296 EvaluationResultImpl visitAdjacentStrings(AdjacentStrings node) { |
| 297 EvaluationResultImpl result = null; | 297 EvaluationResultImpl result = null; |
| 298 for (StringLiteral string in node.strings) { | 298 for (StringLiteral string in node.strings) { |
| 299 if (result == null) { | 299 if (result == null) { |
| 300 result = string.accept(this); | 300 result = string.accept(this); |
| 301 } else { | 301 } else { |
| 302 result = result.concatenate(node, string.accept(this)); | 302 result = result.concatenate(node, string.accept(this)); |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 return result; | 305 return result; |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1744 ValidResult valueOf3(double value) => new ValidResult(value); | 1744 ValidResult valueOf3(double value) => new ValidResult(value); |
| 1745 | 1745 |
| 1746 /** | 1746 /** |
| 1747 * Return a result object representing the given value. | 1747 * Return a result object representing the given value. |
| 1748 * | 1748 * |
| 1749 * @param value the value to be represented as a result object | 1749 * @param value the value to be represented as a result object |
| 1750 * @return a result object representing the given value | 1750 * @return a result object representing the given value |
| 1751 */ | 1751 */ |
| 1752 ValidResult valueOf4(String value) => new ValidResult(value); | 1752 ValidResult valueOf4(String value) => new ValidResult(value); |
| 1753 } | 1753 } |
| OLD | NEW |