1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 17:19:31 +00:00

Translation system first draft

This commit is contained in:
Étienne Fildadut 2023-12-23 21:09:12 +01:00
parent ffadc0dd69
commit c4636343b4
15 changed files with 215 additions and 18 deletions

View file

@ -26,11 +26,11 @@ local ResumeParentFunction = ast.abstract.Node {
end,
_eval = function(self, state)
if resumable_manager:resuming(state, self) then
if self:resuming(state) then
self.expression:eval(state)
return resumable_manager:get_data(state, self):call(state, ArgumentTuple:new())
return self:get_data(state):call(state, ArgumentTuple:new())
else
resumable_manager:set_data(state, self, resumable_manager:capture(state, 1))
self:set_data(state, resumable_manager:capture(state, 1))
return self.expression:eval(state)
end
end