Macro expander integrated in binder

This commit is contained in:
Michael Schimmel
2025-10-04 19:05:50 +02:00
parent d9219474e0
commit 7c48e9e203
16 changed files with 487 additions and 522 deletions
+7 -1
View File
@@ -366,7 +366,13 @@ begin
if not (Length(tailNodes) in [2, 3]) then
raise Exception.Create('Syntax Error in if statement.');
Result := TAst.IfExpr(tailNodes[0], tailNodes[1], IfThen(Length(tailNodes) > 2, tailNodes[2], nil))
Result :=
TAst.IfExpr(
tailNodes[0],
tailNodes[1],
if Length(tailNodes) > 2 then tailNodes[2]
else nil
)
end
else if SameText(head.Token.Text, '?') then
begin