From 074bcb2a7bb770414713b9672dd6c609556b2d3d Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Thu, 3 Nov 2016 12:26:38 +0200 Subject: [PATCH] Make GDScript parser ignore floating strings in class definition Fixes #1320 --- modules/gdscript/gd_parser.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 434f9183557..131b9a0853d 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/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: {