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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1661853005: Introduce getPrefixEndToken to avoid too big context in messages. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 10 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/compiler/lib/src/diagnostics/source_span.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 3f0d70ccab257c5f6f3694efbdd73a1346b78409..121a88214fe2fb52ce9177beeffbb362505724de 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -2115,14 +2115,7 @@ abstract class FunctionElementX extends BaseFunctionElementX
if (span != null && hasNode) {
FunctionExpression functionExpression = node.asFunctionExpression();
if (functionExpression != null) {
- Token begin = functionExpression.getBeginToken();
- Token end;
- if (functionExpression.parameters != null) {
- end = functionExpression.parameters.getEndToken();
- } else {
- end = functionExpression.name.getEndToken();
- }
- span = new SourceSpan.fromTokens(span.uri, begin, end);
+ span = new SourceSpan.fromNode(span.uri, functionExpression);
}
}
return span;
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/source_span.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698