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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/parser.dart

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 | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_experimental/lib/src/generated/parser.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/parser.dart b/pkg/analyzer_experimental/lib/src/generated/parser.dart
index dd13c8e8f38212488dec844704eee382f90703ab..4ab24aa22dbbd298275f4eed62a27ef4a4bcc519 100644
--- a/pkg/analyzer_experimental/lib/src/generated/parser.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/parser.dart
@@ -1139,8 +1139,8 @@ class Parser {
*
* <pre>
* bitwiseAndExpression ::=
- * shiftExpression ('&' shiftExpression)*
- * | 'super' ('&' shiftExpression)+
+ * equalityExpression ('&' equalityExpression)*
+ * | 'super' ('&' equalityExpression)+
* </pre>
*
* @return the bitwise and expression that was parsed
@@ -1150,11 +1150,11 @@ class Parser {
if (matches(Keyword.SUPER) && matches4(peek(), TokenType.AMPERSAND)) {
expression = new SuperExpression.full(andAdvance);
} else {
- expression = parseShiftExpression();
+ expression = parseEqualityExpression();
}
while (matches5(TokenType.AMPERSAND)) {
Token operator = andAdvance;
- expression = new BinaryExpression.full(expression, operator, parseShiftExpression());
+ expression = new BinaryExpression.full(expression, operator, parseEqualityExpression());
}
return expression;
}
@@ -3195,16 +3195,16 @@ class Parser {
*
* <pre>
* logicalAndExpression ::=
- * equalityExpression ('&&' equalityExpression)*
+ * bitwiseOrExpression ('&&' bitwiseOrExpression)*
* </pre>
*
* @return the logical and expression that was parsed
*/
Expression parseLogicalAndExpression() {
- Expression expression = parseEqualityExpression();
+ Expression expression = parseBitwiseOrExpression();
while (matches5(TokenType.AMPERSAND_AMPERSAND)) {
Token operator = andAdvance;
- expression = new BinaryExpression.full(expression, operator, parseEqualityExpression());
+ expression = new BinaryExpression.full(expression, operator, parseBitwiseOrExpression());
}
return expression;
}
@@ -3913,7 +3913,7 @@ class Parser {
*
* <pre>
* relationalExpression ::=
- * bitwiseOrExpression ('is' '!'? type | 'as' type | relationalOperator bitwiseOrExpression)?
+ * shiftExpression ('is' '!'? type | 'as' type | relationalOperator shiftExpression)?
* | 'super' relationalOperator shiftExpression
* </pre>
*
@@ -3923,10 +3923,10 @@ class Parser {
if (matches(Keyword.SUPER) && _currentToken.next.type.isRelationalOperator) {
Expression expression = new SuperExpression.full(andAdvance);
Token operator = andAdvance;
- expression = new BinaryExpression.full(expression, operator, parseBitwiseOrExpression());
+ expression = new BinaryExpression.full(expression, operator, parseShiftExpression());
return expression;
}
- Expression expression = parseBitwiseOrExpression();
+ Expression expression = parseShiftExpression();
if (matches(Keyword.AS)) {
Token asOperator = andAdvance;
expression = new AsExpression.full(expression, asOperator, parseTypeName());
@@ -3939,7 +3939,7 @@ class Parser {
expression = new IsExpression.full(expression, isOperator, notOperator, parseTypeName());
} else if (_currentToken.type.isRelationalOperator) {
Token operator = andAdvance;
- expression = new BinaryExpression.full(expression, operator, parseBitwiseOrExpression());
+ expression = new BinaryExpression.full(expression, operator, parseShiftExpression());
}
return expression;
}
« no previous file with comments | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/Parser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698