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

Unified Diff: tools/gn/location.h

Issue 588893006: gn: attach comments to parse tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: suffix comments too Created 6 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
Index: tools/gn/location.h
diff --git a/tools/gn/location.h b/tools/gn/location.h
index aad3960deb002e9d425d11948c2fdb3c7c15a66d..fc6288e52d0d2bb77bb7f3ebc33c25f7894f5135 100644
--- a/tools/gn/location.h
+++ b/tools/gn/location.h
@@ -13,11 +13,12 @@ class InputFile;
class Location {
public:
Location();
- Location(const InputFile* file, int line_number, int char_offset);
+ Location(const InputFile* file, int line_number, int char_offset, int byte);
const InputFile* file() const { return file_; }
int line_number() const { return line_number_; }
int char_offset() const { return char_offset_; }
+ int byte() const { return byte_; }
bool operator==(const Location& other) const;
bool operator!=(const Location& other) const;
@@ -32,6 +33,7 @@ class Location {
const InputFile* file_; // Null when unset.
int line_number_; // -1 when unset.
brettw 2014/09/23 21:33:15 Cay you document that the line and char offset are
scottmg 2014/09/23 22:15:37 Done.
int char_offset_; // -1 when unset.
+ int byte_;
};
// Represents a range in a source file. Used for error reporting.
« no previous file with comments | « tools/gn/header_checker.cc ('k') | tools/gn/location.cc » ('j') | tools/gn/location.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698