diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 11:18:22 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 11:18:22 +0100 |
commit | 184368ae155fcdd50dde5c2e4b0c87e0d69acdd7 (patch) | |
tree | e3e26ad223ec50da7738b1734ec5f30c43b93649 /main/parse.go | |
parent | c6905e06ba73f47495ba86cebe1cb42f141f308d (diff) | |
download | stred-go-184368ae155fcdd50dde5c2e4b0c87e0d69acdd7.tar |
Replaces the parent/child implementation for operators like store and sum with an output stack
Previously a store state was a parent of another state machine that it would run inside of itself in order to capture the output to be stored.
This was limited as the greedyness of the child would not be transferred to the parent.
The new implementation gives states more control over the output state and turns it into a stack.
By pushing to the stack before the child and popping afterwards, all of the child's output can be retrieved while the child is very much part of the complete machine.
Diffstat (limited to 'main/parse.go')
0 files changed, 0 insertions, 0 deletions