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

Unified Diff: tools/gn/string_utils.cc

Issue 588893006: gn: attach comments to parse tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: x64 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
« no previous file with comments | « tools/gn/scope_unittest.cc ('k') | tools/gn/token.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/string_utils.cc
diff --git a/tools/gn/string_utils.cc b/tools/gn/string_utils.cc
index 2603c15a31e2a69927d39dc4cd299f024a243e88..1aa10812bf7b43aea66a687d5cef58a1184bc7da 100644
--- a/tools/gn/string_utils.cc
+++ b/tools/gn/string_utils.cc
@@ -21,11 +21,13 @@ Err ErrInsideStringToken(const Token& token, size_t offset, size_t size,
int int_offset = static_cast<int>(offset);
Location begin_loc(token.location().file(),
token.location().line_number(),
- token.location().char_offset() + int_offset + 1);
- Location end_loc(token.location().file(),
- token.location().line_number(),
- token.location().char_offset() + int_offset + 1 +
- static_cast<int>(size));
+ token.location().char_offset() + int_offset + 1,
+ token.location().byte() + int_offset + 1);
+ Location end_loc(
+ token.location().file(),
+ token.location().line_number(),
+ token.location().char_offset() + int_offset + 1 + static_cast<int>(size),
+ token.location().byte() + int_offset + 1 + static_cast<int>(size));
return Err(LocationRange(begin_loc, end_loc), msg, help);
}
« no previous file with comments | « tools/gn/scope_unittest.cc ('k') | tools/gn/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698