From cf4cef498489f1dbbb3dea287e88a9a0d820e8b7 Mon Sep 17 00:00:00 2001 From: ASVIEST <71895914+ASVIEST@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:05:00 +0300 Subject: [PATCH] Ast stmt now saves its ast structure in the compiler (#23053) see https://github.com/nim-lang/Nim/issues/23052 --------- Co-authored-by: Andreas Rumpf --- compiler/ccgstmts.nim | 7 ++++++- compiler/pragmas.nim | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 45a2343320..c3d44c1d36 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -1489,7 +1489,12 @@ proc genTrySetjmp(p: BProc, t: PNode, d: var TLoc) = proc genAsmOrEmitStmt(p: BProc, t: PNode, isAsmStmt=false; result: var Rope) = var res = "" - for it in t.sons: + let offset = + if isAsmStmt: 1 # first son is pragmas + else: 0 + + for i in offset..