You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
GDScript: Allow empty files to be valid scripts
This commit is contained in:
@@ -482,12 +482,6 @@ void GDScriptParser::end_statement(const String &p_context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GDScriptParser::parse_program() {
|
void GDScriptParser::parse_program() {
|
||||||
if (current.type == GDScriptTokenizer::Token::TK_EOF) {
|
|
||||||
// Empty file.
|
|
||||||
push_error("Source file is empty.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
head = alloc_node<ClassNode>();
|
head = alloc_node<ClassNode>();
|
||||||
current_class = head;
|
current_class = head;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user