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

Unified Diff: runtime/vm/object.h

Issue 24359005: Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams where possible. (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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index d5c8caddd1e01de4eabb53595fba39ee22f717d8..157612101ee09ca89867c325f147f2e7a43735c3 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2261,6 +2261,10 @@ class Script : public Object {
void GetTokenLocation(intptr_t token_pos,
intptr_t* line, intptr_t* column) const;
+ // Returns index of first and last token on the given line. Returns both
+ // indices < 0 if no token exists on or after the line. If a token exists
+ // after, but not on given line, returns in *first_token_index the index of
+ // the first token after the line, and a negative value in *last_token_index.
void TokenRangeAtLine(intptr_t line_number,
intptr_t* first_token_index,
intptr_t* last_token_index) const;
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698