Oh I just figured out something that feels bloody obvious in hindsight. So, I wa...
MaddieM4 @MaddieM4@raphus.social
Oh I just figured out something that feels bloody obvious in hindsight.
So, I was taking it for granted that in a piece of inline stack assembly like this:
;; foo ~{ bar } baz
;; quux
... that the parser would be extremely simplistic, basically just splitting on contiguous whitespace and merging lines such that we get something kind of like ["foo"ic, "~{"ic, "bar"ic, "}"ic, "baz"ic, "quux"ic]. And then we do something clever at execution time running through these linear tokens, to build up a block with the "bar" instruction in it.
What I've realized is two things:
1. It's just a literal that we can handle at the parse stage instead of execution, and the parser is good at this type of stuff.
2. We technically do not need it, it's sugar!
;; foo newblk
;; 'bar push
;; baz quux
Having to say "push" after each element is annoying but honestly fine. Small price to pay for keeping the implementation simple for an experts-only feature.