diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-20 18:41:59 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-20 18:41:59 -0300 |
commit | 6872139300cefae120d6ec9493ebb134c41ec7cc (patch) | |
tree | 95bf9882a002c2638f509e90f1e9afc1b78c4a44 /core/variant_parser.cpp | |
parent | e9d2c9ad51f7251ec39ccc7a890735bc1225a448 (diff) |
Add quotes to .tscn keys, solves #4366
Diffstat (limited to 'core/variant_parser.cpp')
-rw-r--r-- | core/variant_parser.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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; |