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

Unified Diff: pkg/front_end/lib/src/incremental/unlinked_unit.dart

Issue 2999523002: Share code for parsing local functions. (Closed)
Patch Set: Update _BodySkippingParser. Created 3 years, 4 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/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/incremental/unlinked_unit.dart
diff --git a/pkg/front_end/lib/src/incremental/unlinked_unit.dart b/pkg/front_end/lib/src/incremental/unlinked_unit.dart
index 57c6e07ed0efd386aa050749f612b928c509085c..e074daff1e23b83f3a8da9e22d3f26af5fe1f5c6 100644
--- a/pkg/front_end/lib/src/incremental/unlinked_unit.dart
+++ b/pkg/front_end/lib/src/incremental/unlinked_unit.dart
@@ -114,7 +114,7 @@ class _BodySkippingParser extends Parser {
if (identical('{', token.lexeme)) {
Token close = skipBlock(token);
bodyRanges.add(new _BodyRange(token.charOffset, close.charOffset));
- return close;
+ return isExpression ? close.next : close;
scheglov 2017/08/08 01:42:27 I don't understand this change. How could it be an
ahe 2017/08/08 08:13:30 [isExpression] is true if the function is in expre
scheglov 2017/08/08 15:54:57 Now I understand. Thank you.
ahe 2017/08/08 16:03:33 Great. Would it have been less confusing initially
scheglov 2017/08/08 16:06:03 Even better would be "ofFunctionExpression", becau
}
return super.parseFunctionBody(token, isExpression, allowAbstract);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698