typst-0.9: test/typ/compiler/if-02.out
--- parse tree ---
[ Comment
, SoftBreak
, Comment
, ParBreak
, Code
"typ/compiler/if-02.typ"
( line 4 , column 2 )
(LetFunc
(Identifier "nth")
[ NormalParam (Identifier "n") ]
(Block
(CodeBlock
[ FuncCall
(Ident (Identifier "str")) [ NormalArg (Ident (Identifier "n")) ]
, If
[ ( Equals (Ident (Identifier "n")) (Literal (Int 1))
, Block (CodeBlock [ Literal (String "st") ])
)
, ( Equals (Ident (Identifier "n")) (Literal (Int 2))
, Block (CodeBlock [ Literal (String "nd") ])
)
, ( Equals (Ident (Identifier "n")) (Literal (Int 3))
, Block (CodeBlock [ Literal (String "rd") ])
)
, ( Literal (Boolean True)
, Block (CodeBlock [ Literal (String "th") ])
)
]
])))
, ParBreak
, Code
"typ/compiler/if-02.typ"
( line 12 , column 2 )
(FuncCall
(Ident (Identifier "test"))
[ NormalArg
(FuncCall
(Ident (Identifier "nth")) [ NormalArg (Literal (Int 1)) ])
, NormalArg (Literal (String "1st"))
])
, SoftBreak
, Code
"typ/compiler/if-02.typ"
( line 13 , column 2 )
(FuncCall
(Ident (Identifier "test"))
[ NormalArg
(FuncCall
(Ident (Identifier "nth")) [ NormalArg (Literal (Int 2)) ])
, NormalArg (Literal (String "2nd"))
])
, SoftBreak
, Code
"typ/compiler/if-02.typ"
( line 14 , column 2 )
(FuncCall
(Ident (Identifier "test"))
[ NormalArg
(FuncCall
(Ident (Identifier "nth")) [ NormalArg (Literal (Int 3)) ])
, NormalArg (Literal (String "3rd"))
])
, SoftBreak
, Code
"typ/compiler/if-02.typ"
( line 15 , column 2 )
(FuncCall
(Ident (Identifier "test"))
[ NormalArg
(FuncCall
(Ident (Identifier "nth")) [ NormalArg (Literal (Int 4)) ])
, NormalArg (Literal (String "4th"))
])
, SoftBreak
, Code
"typ/compiler/if-02.typ"
( line 16 , column 2 )
(FuncCall
(Ident (Identifier "test"))
[ NormalArg
(FuncCall
(Ident (Identifier "nth")) [ NormalArg (Literal (Int 5)) ])
, NormalArg (Literal (String "5th"))
])
, ParBreak
]
--- evaluated ---
document(body: { text(body: [
]),
parbreak(),
parbreak(),
text(body: [✅]),
text(body: [
]),
text(body: [✅]),
text(body: [
]),
text(body: [✅]),
text(body: [
]),
text(body: [✅]),
text(body: [
]),
text(body: [✅]),
parbreak() })