Browse Source

Make GDScript parser ignore floating strings in class definition

Fixes #1320
Bojidar Marinov 8 years ago
parent
commit
074bcb2a7b
1 changed files with 10 additions and 1 deletions
  1. 10 1
      modules/gdscript/gd_parser.cpp

+ 10 - 1
modules/gdscript/gd_parser.cpp

@@ -3375,7 +3375,16 @@ void GDParser::_parse_class(ClassNode *p_class) {
 				
 
 			} break;
-
+			
+			case GDTokenizer::TK_CONSTANT: {
+				if(tokenizer->get_token_constant().get_type() == Variant::STRING) {
+					tokenizer->advance();
+					// Ignore
+				} else {
+					_set_error(String()+"Unexpected constant of type: "+Variant::get_type_name(tokenizer->get_token_constant().get_type()));
+					return;
+				}
+			} break;
 
 			default: {