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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java

Issue 24195012: Revert "Attempt to change analyzer to parse the new order of operators." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/src/generated/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java
index c84ac6cda71399cc80e7230b2bbb3fa0ea6aeec2..118bee0a83562a5e5c604a96e5dceafa1905021d 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java
@@ -1186,8 +1186,8 @@ public class Parser {
*
* <pre>
* bitwiseAndExpression ::=
- * shiftExpression ('&' shiftExpression)*
- * | 'super' ('&' shiftExpression)+
+ * equalityExpression ('&' equalityExpression)*
+ * | 'super' ('&' equalityExpression)+
* </pre>
*
* @return the bitwise and expression that was parsed
@@ -1197,11 +1197,11 @@ public class Parser {
if (matches(Keyword.SUPER) && matches(peek(), TokenType.AMPERSAND)) {
expression = new SuperExpression(getAndAdvance());
} else {
- expression = parseShiftExpression();
+ expression = parseEqualityExpression();
}
while (matches(TokenType.AMPERSAND)) {
Token operator = getAndAdvance();
- expression = new BinaryExpression(expression, operator, parseShiftExpression());
+ expression = new BinaryExpression(expression, operator, parseEqualityExpression());
}
return expression;
}
@@ -3718,16 +3718,16 @@ public class Parser {
*
* <pre>
* logicalAndExpression ::=
- * equalityExpression ('&&' equalityExpression)*
+ * bitwiseOrExpression ('&&' bitwiseOrExpression)*
* </pre>
*
* @return the logical and expression that was parsed
*/
private Expression parseLogicalAndExpression() {
- Expression expression = parseEqualityExpression();
+ Expression expression = parseBitwiseOrExpression();
while (matches(TokenType.AMPERSAND_AMPERSAND)) {
Token operator = getAndAdvance();
- expression = new BinaryExpression(expression, operator, parseEqualityExpression());
+ expression = new BinaryExpression(expression, operator, parseBitwiseOrExpression());
}
return expression;
}
@@ -4571,8 +4571,8 @@ public class Parser {
*
* <pre>
* relationalExpression ::=
- * bitwiseOrExpression ('is' '!'? type | 'as' type | relationalOperator bitwiseOrExpression)?
- * | 'super' relationalOperator bitwiseOrExpression
+ * shiftExpression ('is' '!'? type | 'as' type | relationalOperator shiftExpression)?
+ * | 'super' relationalOperator shiftExpression
* </pre>
*
* @return the relational expression that was parsed
@@ -4581,10 +4581,10 @@ public class Parser {
if (matches(Keyword.SUPER) && currentToken.getNext().getType().isRelationalOperator()) {
Expression expression = new SuperExpression(getAndAdvance());
Token operator = getAndAdvance();
- expression = new BinaryExpression(expression, operator, parseBitwiseOrExpression());
+ expression = new BinaryExpression(expression, operator, parseShiftExpression());
return expression;
}
- Expression expression = parseBitwiseOrExpression();
+ Expression expression = parseShiftExpression();
if (matches(Keyword.AS)) {
Token asOperator = getAndAdvance();
expression = new AsExpression(expression, asOperator, parseTypeName());
@@ -4597,7 +4597,7 @@ public class Parser {
expression = new IsExpression(expression, isOperator, notOperator, parseTypeName());
} else if (currentToken.getType().isRelationalOperator()) {
Token operator = getAndAdvance();
- expression = new BinaryExpression(expression, operator, parseBitwiseOrExpression());
+ expression = new BinaryExpression(expression, operator, parseShiftExpression());
}
return expression;
}
« no previous file with comments | « no previous file | pkg/analyzer_experimental/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698