This commit is contained in:
Spartan322
2024-12-15 09:24:31 -05:00
1031 changed files with 128643 additions and 5393 deletions

View File

@@ -475,10 +475,11 @@ Error Expression::_get_token(Token &r_token) {
} else if (id == "self") {
r_token.type = TK_SELF;
} else {
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
if (id == Variant::get_type_name(Variant::Type(i))) {
{
const Variant::Type type = Variant::get_type_by_name(id);
if (type < Variant::VARIANT_MAX) {
r_token.type = TK_BASIC_TYPE;
r_token.value = i;
r_token.value = type;
return OK;
}
}