From 6872139300cefae120d6ec9493ebb134c41ec7cc Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 20 Jun 2016 18:41:59 -0300 Subject: Add quotes to .tscn keys, solves #4366 --- core/variant_parser.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'core/variant_parser.cpp') diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 886bea2910..dce873a306 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -1775,7 +1775,20 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r } if (c>32) { - if (c!='=') { + if (c=='"') { //quoted + p_stream->saved='"'; + Token tk; + Error err = get_token(p_stream,tk,line,r_err_str); + if (err) + return err; + if (tk.type!=TK_STRING) { + r_err_str="Error reading quoted string"; + return err; + } + + what=tk.value; + + } else if (c!='=') { what+=String::chr(c); } else { r_assign=what; -- cgit v1.2.3