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

28 lines
489 B
Plaintext

/*
Parses this:
dowhile {
...code...
} (...cond...)
Into this:
...code...
while(...cond...) {
...code...
}
*/
// -> [bytecodes]
::builtin dowhile @body
"" parseblock {} // "" means no entry into the symbol table (unnamed function) - equals to 0
do@body(.) // (.) does not removes - only (_) no need for gencode because
gen(while) // address top bit 1 when builtin from C
genopen() // equal to 1 gencode(_)
"" parseblock ()
genclose()
genopen{}
do@body
genclose{}
;