typst-0.9: test/typ/meta/query-header-00.out
--- parse tree ---
[ Code
"typ/meta/query-header-00.typ"
( line 1 , column 2 )
(Set
(Ident (Identifier "page"))
[ KeyValArg (Identifier "paper") (Literal (String "a7"))
, KeyValArg
(Identifier "margin")
(Dict
[ Reg ( Ident (Identifier "y") , Literal (Numeric 1.0 Cm) )
, Reg ( Ident (Identifier "x") , Literal (Numeric 0.5 Cm) )
])
, KeyValArg
(Identifier "header")
(Block
(CodeBlock
[ FuncCall
(Ident (Identifier "smallcaps"))
[ BlockArg [ Text "Typst" , Space , Text "Academy" ] ]
, FuncCall
(Ident (Identifier "h")) [ NormalArg (Literal (Numeric 1.0 Fr)) ]
, FuncCall
(Ident (Identifier "locate"))
[ NormalArg
(FuncExpr
[ NormalParam (Identifier "it") ]
(Block
(CodeBlock
[ Let
(BasicBind (Just (Identifier "after")))
(FuncCall
(Ident (Identifier "query"))
[ NormalArg
(FuncCall
(FieldAccess
(Ident (Identifier "after"))
(FuncCall
(Ident (Identifier "selector"))
[ NormalArg (Ident (Identifier "heading")) ]))
[ NormalArg (Ident (Identifier "it")) ])
, NormalArg (Ident (Identifier "it"))
])
, Let
(BasicBind (Just (Identifier "before")))
(FuncCall
(Ident (Identifier "query"))
[ NormalArg
(FuncCall
(FieldAccess
(Ident (Identifier "before"))
(FuncCall
(Ident (Identifier "selector"))
[ NormalArg (Ident (Identifier "heading")) ]))
[ NormalArg (Ident (Identifier "it")) ])
, NormalArg (Ident (Identifier "it"))
])
, Let
(BasicBind (Just (Identifier "elem")))
(If
[ ( Not
(Equals
(FuncCall
(FieldAccess
(Ident (Identifier "len"))
(Ident (Identifier "before")))
[])
(Literal (Int 0)))
, Block
(CodeBlock
[ FuncCall
(FieldAccess
(Ident (Identifier "last"))
(Ident (Identifier "before")))
[]
])
)
, ( Not
(Equals
(FuncCall
(FieldAccess
(Ident (Identifier "len"))
(Ident (Identifier "after")))
[])
(Literal (Int 0)))
, Block
(CodeBlock
[ FuncCall
(FieldAccess
(Ident (Identifier "first"))
(Ident (Identifier "after")))
[]
])
)
])
, FuncCall
(Ident (Identifier "emph"))
[ NormalArg
(FieldAccess
(Ident (Identifier "body"))
(Ident (Identifier "elem")))
]
])))
]
]))
])
, ParBreak
, Code
"typ/meta/query-header-00.typ"
( line 20 , column 2 )
(FuncCall (Ident (Identifier "outline")) [])
, ParBreak
, Heading 1 [ Text "Introduction" ]
, SoftBreak
, Code
"typ/meta/query-header-00.typ"
( line 23 , column 2 )
(FuncCall
(Ident (Identifier "lorem")) [ NormalArg (Literal (Int 35)) ])
, ParBreak
, Heading 1 [ Text "Background" ]
, SoftBreak
, Code
"typ/meta/query-header-00.typ"
( line 26 , column 2 )
(FuncCall
(Ident (Identifier "lorem")) [ NormalArg (Literal (Int 35)) ])
, ParBreak
, Heading 1 [ Text "Approach" ]
, SoftBreak
, Code
"typ/meta/query-header-00.typ"
( line 29 , column 2 )
(FuncCall
(Ident (Identifier "lorem")) [ NormalArg (Literal (Int 60)) ])
, ParBreak
]
--- evaluated ---
document(body: { parbreak(),
outline(),
parbreak(),
heading(body: text(body: [Introduction]),
level: 1),
text(body: [Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo]),
parbreak(),
heading(body: text(body: [Background]),
level: 1),
text(body: [Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo]),
parbreak(),
heading(body: text(body: [Approach]),
level: 1),
text(body: [Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in]),
parbreak() })