You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to write an implementation of seq, sel etc. where everything is a generator.
When error<Parser, "message"> is encountered, yield Recovered("message").
On entering a rule (a call), return child generator wrapped in Batch(), effectively trampolining it.
Make runParser(gen: () => Generator<...>) that
when gen yields a Batch, push current generator on a const stack = []; and continue with the new generator
when gen yields a Recovered, yield it
In order to prevent Tact running in browser from making the page freeze (before we implement better measures such as Worker; those require peculiar build process, major changes to API and making the code isomorphic)
every N steps do a check
if delta on Date.now() between current and previous check is larger than M
await Promise.resolve(); to ensure other threads have time to do their job
Try to write an implementation of
seq
,sel
etc. where everything is a generator.When
error<Parser, "message">
is encountered,yield Recovered("message")
.On entering a rule (a call), return child generator wrapped in
Batch()
, effectively trampolining it.Make
runParser(gen: () => Generator<...>)
thatgen
yields aBatch
, push current generator on aconst stack = [];
and continue with the new generatorgen
yields aRecovered
, yield itIn order to prevent Tact running in browser from making the page freeze (before we implement better measures such as
Worker
; those require peculiar build process, major changes to API and making the code isomorphic)Date.now()
between current and previous check is larger than Mawait Promise.resolve();
to ensure other threads have time to do their jobBlocker to #1582
The text was updated successfully, but these errors were encountered: