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

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

Issue 285423002: New analyzer snapshot (with CaughtException). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Replace AnalysisException with CaughtException Created 6 years, 7 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 | « pkg/analyzer/lib/src/generated/java_engine.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index e64f9bd11f09432a716038d0c3f5688a26aea518..bac76fa693b2a243d5946701515ebfc1fe534d98 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -2049,7 +2049,7 @@ class Parser {
}
/**
- * Parse an expression that does not contain any cascades.
+ * Parse an expression that might contain a cascade.
*
* <pre>
* expression ::=
@@ -3529,7 +3529,8 @@ class Parser {
*
* @param prefix the expression preceding the selector
* @param optional `true` if the selector is optional
- * @return the assignable selector that was parsed
+ * @return the assignable selector that was parsed, or the original prefix if there was no
+ * assignable selector
*/
Expression _parseAssignableSelector(Expression prefix, bool optional) {
if (_matches(TokenType.OPEN_SQUARE_BRACKET)) {
@@ -3667,6 +3668,7 @@ class Parser {
_reportErrorForToken(ParserErrorCode.MISSING_IDENTIFIER, _currentToken, [_currentToken.lexeme]);
functionName = _createSyntheticIdentifier();
}
+ assert((expression == null && functionName != null) || (expression != null && functionName == null));
if (_currentToken.type == TokenType.OPEN_PAREN) {
while (_currentToken.type == TokenType.OPEN_PAREN) {
if (functionName != null) {
@@ -3684,6 +3686,7 @@ class Parser {
expression = new PropertyAccess(expression, period, functionName);
period = null;
}
+ assert(expression != null);
bool progress = true;
while (progress) {
progress = false;
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_engine.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698