Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: frog/leg/compile_time_constants.dart

Issue 9808092: Visit parenthesized expressions in compile-time constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test and update status files. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-leg.status » ('j') | tests/co19/co19-leg.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/compile_time_constants.dart
diff --git a/frog/leg/compile_time_constants.dart b/frog/leg/compile_time_constants.dart
index bee8dfaf6a812bd6fde67c4ee25ac446a7279845..b1aa8fe7d83025b2d7a9ecb51530126f1a370b74 100644
--- a/frog/leg/compile_time_constants.dart
+++ b/frog/leg/compile_time_constants.dart
@@ -693,7 +693,7 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
}
visitNode(Node node) {
- compiler.unimplemented("CompileTimeConstantEvaluator", node: node);
+ error(node);
}
Constant visitLiteralBool(LiteralBool node) {
@@ -1056,6 +1056,10 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
return constant;
}
+ Constant visitParenthesizedExpression(ParenthesizedExpression node) {
+ return node.expression.accept(this);
+ }
+
error(Node node) {
// TODO(floitsch): get the list of constants that are currently compiled
// and present some kind of stack-trace.
« no previous file with comments | « no previous file | tests/co19/co19-leg.status » ('j') | tests/co19/co19-leg.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698