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

Unified Diff: runtime/vm/scopes.h

Issue 2419013004: Add local variable declaration token position to service protocol (Closed)
Patch Set: ... Created 4 years, 2 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/regexp_assembler_ir.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.h
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index 9b1877e4f8c37ccc05db7420b05c5df2fdcfe19f..c3b761137f490be0f7bdaec34522b0025ccfecbd 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -21,10 +21,12 @@ class LocalScope;
class LocalVariable : public ZoneAllocated {
public:
- LocalVariable(TokenPosition token_pos,
+ LocalVariable(TokenPosition declaration_pos,
+ TokenPosition token_pos,
const String& name,
const AbstractType& type)
- : token_pos_(token_pos),
+ : declaration_pos_(declaration_pos),
+ token_pos_(token_pos),
name_(name),
owner_(NULL),
type_(type),
@@ -41,6 +43,7 @@ class LocalVariable : public ZoneAllocated {
}
TokenPosition token_pos() const { return token_pos_; }
+ TokenPosition declaration_token_pos() const { return declaration_pos_; }
const String& name() const { return name_; }
LocalScope* owner() const { return owner_; }
void set_owner(LocalScope* owner) {
@@ -117,6 +120,7 @@ class LocalVariable : public ZoneAllocated {
private:
static const int kUninitializedIndex = INT_MIN;
+ const TokenPosition declaration_pos_;
const TokenPosition token_pos_;
const String& name_;
LocalScope* owner_; // Local scope declaring this variable.
« no previous file with comments | « runtime/vm/regexp_assembler_ir.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698