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

Unified Diff: src/parser.h

Issue 24076007: Unify handling of position info in AST, part 1 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « src/full-codegen.cc ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 783626ad190f28bd030caeab3d635a72d7df7202..57ccceb1f388aadb9376afd68b3bed23f7f953e0 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -592,6 +592,8 @@ class Parser BASE_EMBEDDED {
bool inside_with() const { return top_scope_->inside_with(); }
Scanner& scanner() { return scanner_; }
+ int position() { return scanner_.location().beg_pos; }
+ int peek_position() { return scanner_.peek_location().beg_pos; }
Mode mode() const { return mode_; }
ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; }
bool is_extended_mode() {
@@ -768,8 +770,8 @@ class Parser BASE_EMBEDDED {
Handle<String> GetSymbol();
// Get odd-ball literals.
- Literal* GetLiteralUndefined();
- Literal* GetLiteralTheHole();
+ Literal* GetLiteralUndefined(int position);
+ Literal* GetLiteralTheHole(int position);
Handle<String> ParseIdentifier(bool* ok);
Handle<String> ParseIdentifierOrStrictReservedWord(
« no previous file with comments | « src/full-codegen.cc ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698