slc/examples/do.slc
2025-01-27 04:03:44 +01:00

29 lines
489 B
Plaintext

// A parseblock_outer should change return address,
// so parsing continues at a different location!
// This is needed because we have processed the
// stuff AFTER the word "do"...
::builtin do
parseword
if("(" streq) {
drop parseword
if(")" streq) {
"" parseblock_outer()
}
} [
if("[" streq) {
drop parseword
if("]" streq) {
"" parseblock_outer[]
}
} [
if("{" streq) {
drop parseword
if("}" streq) {
"" parseblock_outer{}
}
}
]
]
;