mirror of
https://github.com/godotengine/godot
synced 2024-10-07 08:47:43 +00:00
GDScript: Allow empty files to be valid scripts
This commit is contained in:
parent
3abb3c0d6e
commit
0f9923e67f
|
@ -482,12 +482,6 @@ void GDScriptParser::end_statement(const String &p_context) {
|
|||
}
|
||||
|
||||
void GDScriptParser::parse_program() {
|
||||
if (current.type == GDScriptTokenizer::Token::TK_EOF) {
|
||||
// Empty file.
|
||||
push_error("Source file is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
head = alloc_node<ClassNode>();
|
||||
current_class = head;
|
||||
|
||||
|
|
Loading…
Reference in a new issue