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

Unified Diff: runtime/lib/math.cc

Issue 9264051: Fix for bug 1229: Unary operator plus is not allowed ... except for literals. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | runtime/vm/ast.cc » ('j') | runtime/vm/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/math.cc
===================================================================
--- runtime/lib/math.cc (revision 3739)
+++ runtime/lib/math.cc (working copy)
@@ -89,14 +89,15 @@
return true;
}
if ((tokens.length() == 3) &&
- ((tokens[0].kind == Token::kADD) || (tokens[0].kind == Token::kSUB)) &&
+ ((tokens[0].kind == Token::kTIGHTADD) ||
+ (tokens[0].kind == Token::kSUB)) &&
(tokens[1].kind == literal_kind) &&
(tokens[2].kind == Token::kEOS)) {
// Check there is no space between "+/-" and number.
if ((tokens[0].offset + 1) != tokens[1].offset) {
return false;
}
- *is_positive = tokens[0].kind == Token::kADD;
+ *is_positive = tokens[0].kind == Token::kTIGHTADD;
*value = tokens[1].literal;
return true;
}
« no previous file with comments | « no previous file | runtime/vm/ast.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698