Răsfoiți Sursa

GDScript: Allow empty files to be valid scripts

George Marques 5 ani în urmă
părinte
comite
0f9923e67f
1 a modificat fișierele cu 0 adăugiri și 6 ștergeri
  1. 0 6
      modules/gdscript/gdscript_parser.cpp

+ 0 - 6
modules/gdscript/gdscript_parser.cpp

@@ -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;