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

Unified Diff: tools/gn/tokenizer.h

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/token.h ('k') | tools/gn/tokenizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/tokenizer.h
diff --git a/tools/gn/tokenizer.h b/tools/gn/tokenizer.h
index 13d79097ce39a1f38809f2f53c122680896d5b77..6a1a80afbdf99596099a849bc6d886bcf02446ae 100644
--- a/tools/gn/tokenizer.h
+++ b/tools/gn/tokenizer.h
@@ -52,6 +52,11 @@ class Tokenizer {
Token::Type ClassifyCurrent() const;
void AdvanceToEndOfToken(const Location& location, Token::Type type);
+ // Whether from this location back to the beginning of the line is only
+ // whitespace. |location| should be the first character of the token to be
+ // checked.
+ bool AtStartOfLine(size_t location) const;
+
bool IsCurrentWhitespace() const;
bool IsCurrentNewline() const;
bool IsCurrentStringTerminator(char quote_char) const;
« no previous file with comments | « tools/gn/token.h ('k') | tools/gn/tokenizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698