#unroll(N) for

This commit is contained in:
gingerBill
2025-01-10 12:14:43 +00:00
parent 4a2b13f1c2
commit 328d893cb5
7 changed files with 339 additions and 77 deletions
+5 -2
View File
@@ -432,10 +432,13 @@ Range_Stmt :: struct {
reverse: bool,
}
Inline_Range_Stmt :: struct {
Inline_Range_Stmt :: Unroll_Range_Stmt
Unroll_Range_Stmt :: struct {
using node: Stmt,
label: ^Expr,
inline_pos: tokenizer.Pos,
unroll_pos: tokenizer.Pos,
args: []^Expr,
for_pos: tokenizer.Pos,
val0: ^Expr,
val1: ^Expr,
+2 -1
View File
@@ -242,8 +242,9 @@ clone_node :: proc(node: ^Node) -> ^Node {
r.vals = clone(r.vals)
r.expr = clone(r.expr)
r.body = clone(r.body)
case ^Inline_Range_Stmt:
case ^Unroll_Range_Stmt:
r.label = clone(r.label)
r.args = clone(r.args)
r.val0 = clone(r.val0)
r.val1 = clone(r.val1)
r.expr = clone(r.expr)