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

Unified Diff: tools/gn/tokenizer.cc

Issue 1024333002: tools/gn: Give a better informative message if user uses apostrophe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bratell Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/tokenizer.cc
diff --git a/tools/gn/tokenizer.cc b/tools/gn/tokenizer.cc
index 402b5ecaeb03ac49e777caaedc0158abaaa043c2..567fa72b479e92f824e48e43943461a6f9904792 100644
--- a/tools/gn/tokenizer.cc
+++ b/tools/gn/tokenizer.cc
@@ -388,6 +388,8 @@ Err Tokenizer::GetErrorForInvalidToken(const Location& location) const {
(input_[cur_ + 1] == '/' || input_[cur_ + 1] == '*')) {
// Different types of comments.
help = "Comments should start with # instead";
+ } else if (cur_char() == '\'') {
+ help = "Strings are delimited by \" characters, not apostrophes.";
} else {
help = "I have no idea what this is.";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698