Fix Variant::OBJECT token parsing
This commit is contained in:
parent
40959acef2
commit
0a8de39bb1
1 changed files with 6 additions and 2 deletions
|
@ -744,7 +744,12 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (token.type == TK_PARENTHESIS_CLOSE) {
|
if (token.type == TK_PARENTHESIS_CLOSE) {
|
||||||
|
Reference *reference = obj->cast_to<Reference>();
|
||||||
|
if (reference) {
|
||||||
|
value = REF(reference);
|
||||||
|
} else {
|
||||||
|
value = obj;
|
||||||
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -760,7 +765,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get_token(p_stream, token, line, r_err_str);
|
|
||||||
if (token.type != TK_STRING) {
|
if (token.type != TK_STRING) {
|
||||||
r_err_str = "Expected property name as string";
|
r_err_str = "Expected property name as string";
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
|
|
Loading…
Reference in a new issue