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

Unified Diff: tools/gn/location.cc

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.cc
diff --git a/tools/gn/location.cc b/tools/gn/location.cc
index 61f22b5e079d2c273b189192f09eb361e6acf7ea..15bd0129ef681c37a33066c86317c9ef9681bf6d 100644
--- a/tools/gn/location.cc
+++ b/tools/gn/location.cc
@@ -14,11 +14,14 @@ Location::Location()
char_offset_(-1) {
}
-Location::Location(const InputFile* file, int line_number, int char_offset)
+Location::Location(const InputFile* file,
+ int line_number,
+ int char_offset,
+ int byte)
: file_(file),
line_number_(line_number),
- char_offset_(char_offset) {
-}
+ char_offset_(char_offset),
+ byte_(byte) {}
brettw 2014/09/23 21:33:15 I liked the {} on separate lines.
scottmg 2014/09/23 22:15:37 Oops, clang-format, sorry. Done.
bool Location::operator==(const Location& other) const {
return other.file_ == file_ &&

Powered by Google App Engine
This is Rietveld 408576698