2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-07 09:17:26 +00:00

Add non static evaluation for simple expressions

This commit is contained in:
Jan
2022-08-13 14:13:11 +02:00
parent 403d7f2c44
commit 886bcfeaf8
21 changed files with 161 additions and 59 deletions

View File

@@ -573,7 +573,7 @@ namespace menu::event_handler_set_scope_sequences
static void EmitStaticSetLocalVar(MenuFileParserState* state, const TokenPos& pos, const SetLocalVarType type, const std::string& varName, std::unique_ptr<ISimpleExpression> expression)
{
state->m_current_script << "\"" << ScriptKeywordForType(type) << "\" \"" << varName << "\" \"";
const auto staticValue = expression->Evaluate();
const auto staticValue = expression->EvaluateStatic();
CheckStaticValueType(pos, type, staticValue);
EmitStaticValue(state, staticValue);
state->m_current_script << "\" ; ";