1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Fix continuation lines in GDScriptTokenizerBuffer

This commit is contained in:
Danil Alexeev
2024-03-14 12:33:56 +03:00
parent 6c57928063
commit 02253b6b91
5 changed files with 35 additions and 11 deletions

View File

@@ -1455,10 +1455,11 @@ GDScriptTokenizer::Token GDScriptTokenizerText::scan() {
if (_peek() != '\n') {
return make_error("Expected new line after \"\\\".");
}
continuation_lines.push_back(line);
_advance();
newline(false);
line_continuation = true;
_skip_whitespace(); // Skip whitespace/comment lines after `\`. See GH-89403.
continuation_lines.push_back(line);
return scan(); // Recurse to get next token.
}