diff options
author | George Marques <george@gmarqu.es> | 2020-06-01 16:40:29 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2020-07-20 11:38:39 -0300 |
commit | 34c28eb2b8f3bb96edafba50d0689c49335146dc (patch) | |
tree | bbd7b62b014d8a5b49d5b63b0e978ee54ae6c966 | |
parent | 5d6e8538065050d5f5579ec03cfa9e241811e062 (diff) |
Fix comments in beginning of file
Also improve error for unknown characters.
-rw-r--r-- | modules/gdscript/gdscript_tokenizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 1f3881239b..7a02cc209c 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -791,7 +791,7 @@ void GDScriptTokenizer::check_indent() { CharType current_indent_char = _peek(); int indent_count = 0; - if (current_indent_char != ' ' && current_indent_char != '\t' && current_indent_char != '\r' && current_indent_char != '\n') { + if (current_indent_char != ' ' && current_indent_char != '\t' && current_indent_char != '\r' && current_indent_char != '\n' && current_indent_char != '#') { // First character of the line is not whitespace, so we clear all indentation levels. // Unless we are in a continuation or in multiline mode (inside expression). if (line_continuation || multiline_mode) { @@ -1248,7 +1248,7 @@ GDScriptTokenizer::Token GDScriptTokenizer::scan() { } default: - return make_error("Unknown character."); + return make_error(vformat(R"(Unknown character "%s".")", String(&c, 1))); } } |