OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/tokenizer.h" | 5 #include "tools/gn/tokenizer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "tools/gn/input_file.h" | 9 #include "tools/gn/input_file.h" |
10 | 10 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // Semicolon. | 381 // Semicolon. |
382 help = "Semicolons are not needed, delete this one."; | 382 help = "Semicolons are not needed, delete this one."; |
383 } else if (cur_char() == '\t') { | 383 } else if (cur_char() == '\t') { |
384 // Tab. | 384 // Tab. |
385 help = "You got a tab character in here. Tabs are evil. " | 385 help = "You got a tab character in here. Tabs are evil. " |
386 "Convert to spaces."; | 386 "Convert to spaces."; |
387 } else if (cur_char() == '/' && cur_ + 1 < input_.size() && | 387 } else if (cur_char() == '/' && cur_ + 1 < input_.size() && |
388 (input_[cur_ + 1] == '/' || input_[cur_ + 1] == '*')) { | 388 (input_[cur_ + 1] == '/' || input_[cur_ + 1] == '*')) { |
389 // Different types of comments. | 389 // Different types of comments. |
390 help = "Comments should start with # instead"; | 390 help = "Comments should start with # instead"; |
| 391 } else if (cur_char() == '\'') { |
| 392 help = "Strings are delimited by \" characters, not apostrophes."; |
391 } else { | 393 } else { |
392 help = "I have no idea what this is."; | 394 help = "I have no idea what this is."; |
393 } | 395 } |
394 | 396 |
395 return Err(location, "Invalid token.", help); | 397 return Err(location, "Invalid token.", help); |
396 } | 398 } |
OLD | NEW |