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

Unified Diff: runtime/vm/parser.cc

Issue 9240014: Set breakpoint at url, line number (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 3419)
+++ runtime/vm/parser.cc (working copy)
@@ -2069,6 +2069,7 @@
// Only constructors can redirect to another method.
ASSERT((method->redirect_name == NULL) || method->IsConstructor());
+ intptr_t method_end_pos = method_pos;
if ((CurrentToken() == Token::kLBRACE) ||
(CurrentToken() == Token::kARROW)) {
if (method->has_abstract) {
@@ -2094,6 +2095,7 @@
SkipExpr();
ExpectSemicolon();
}
+ method_end_pos = token_index_;
} else if (IsLiteral("native")) {
if (method->has_abstract) {
ErrorMsg(method->name_pos,
@@ -2151,6 +2153,7 @@
method->has_const,
method_pos));
func.set_result_type(*method->type);
+ func.set_end_token_index(method_end_pos);
// No need to resolve parameter types yet, or add parameters to local scope.
ASSERT(is_top_level_);
@@ -3144,12 +3147,15 @@
const bool allow_explicit_default_values = true;
ParseFormalParameterList(allow_explicit_default_values, &params);
+ intptr_t function_end_pos = function_pos;
if (CurrentToken() == Token::kLBRACE) {
SkipBlock();
+ function_end_pos = token_index_;
} else if (CurrentToken() == Token::kARROW) {
ConsumeToken();
SkipExpr();
ExpectSemicolon();
+ function_end_pos = token_index_;
} else if (IsLiteral("native")) {
ParseNativeDeclaration();
} else {
@@ -3159,6 +3165,7 @@
Function::New(func_name, RawFunction::kFunction,
is_static, false, function_pos));
func.set_result_type(result_type);
+ func.set_end_token_index(function_end_pos);
AddFormalParamsToFunction(&params, func);
top_level->functions.Add(&func);
library_.AddObject(func, func_name);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698