feat: code generation for conditional and switch statements
This commit is contained in:
parent
889f678dd8
commit
d6ff3a40bd
7 changed files with 476 additions and 59 deletions
|
|
@ -245,9 +245,7 @@ fn popScratch(p: *Parse, context: *const StmtContext) *Ast.Node {
|
|||
@panic("BUG: Scratch buffer popped when empty!");
|
||||
}
|
||||
|
||||
fn nodeListFromScratch(p: *Parse, start_offset: usize, end_offset: usize) Error!?[]*Ast.Node {
|
||||
if (start_offset >= end_offset) return null;
|
||||
|
||||
fn nodeListFromScratch(p: *Parse, start_offset: usize, end_offset: usize) Error![]*Ast.Node {
|
||||
const span = end_offset - start_offset;
|
||||
assert(span > 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue