Implements indexing with period identifier style (`foo.bar`)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-17 15:45:33 +02:00
parent d06b04cae9
commit d91caa7f32
17 changed files with 207 additions and 32 deletions

View File

@@ -46,6 +46,11 @@ public:
return shared_ptr<EvalValue>(field->Get(_obj));
}
shared_ptr<EvalValue> IndexValue(uint32_t hash) final{
auto field = _userData->GetField(hash);
return shared_ptr<EvalValue>(field->Get(_obj));
}
void SetIndexValue(EvalValue *key, shared_ptr<EvalValue> value) final{
auto fieldId = key->GetHashCode();
auto field = _userData->GetField(fieldId);