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

Unified Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 1311783012: Split parser/listener.dart, parser/class_element_listener.dart and tokens/token.dart into smaller l… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
Index: pkg/compiler/lib/src/tree/nodes.dart
diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart
index e239366b3c2592e8bc89c1ca6486cf0c69d2a500..56f1f26bf4ff793d52df0cc9ec9e7bf4fc88a47b 100644
--- a/pkg/compiler/lib/src/tree/nodes.dart
+++ b/pkg/compiler/lib/src/tree/nodes.dart
@@ -852,7 +852,9 @@ class LiteralInt extends Literal<int> {
int get value {
try {
Token valueToken = token;
- if (identical(valueToken.kind, PLUS_TOKEN)) valueToken = valueToken.next;
+ if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) {
+ valueToken = valueToken.next;
+ }
return int.parse(valueToken.value);
} on FormatException catch (ex) {
(this.handler)(token, ex);
@@ -871,7 +873,9 @@ class LiteralDouble extends Literal<double> {
double get value {
try {
Token valueToken = token;
- if (identical(valueToken.kind, PLUS_TOKEN)) valueToken = valueToken.next;
+ if (identical(valueToken.kind, Tokens.PLUS_TOKEN)) {
+ valueToken = valueToken.next;
+ }
return double.parse(valueToken.value);
} on FormatException catch (ex) {
(this.handler)(token, ex);
@@ -1087,7 +1091,7 @@ class Return extends Statement {
bool get hasExpression => expression != null;
/// `true` if this return is of the form `=> e;`.
- bool get isArrowBody => beginToken.info == FUNCTION_INFO;
+ bool get isArrowBody => beginToken.info == Precedence.FUNCTION_INFO;
accept(Visitor visitor) => visitor.visitReturn(this);

Powered by Google App Engine
This is Rietveld 408576698