mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
32 lines
567 B
XML
32 lines
567 B
XML
// Test bracket call chaining.
|
|
|
|
---
|
|
// Chained once.
|
|
#[f | f]
|
|
|
|
// Chained twice.
|
|
#[f|f|f]
|
|
|
|
// With body.
|
|
// Error: 7-8 expected identifier, found integer
|
|
#[f | 1 | box][💕]
|
|
|
|
// With actual functions.
|
|
#[box width: 1cm | image "res/rhino.png"]
|
|
|
|
---
|
|
// Error: 8-8 expected identifier
|
|
#[f 1 |]
|
|
|
|
// Error: 4-4 expected identifier
|
|
#[ | f true]
|
|
|
|
// Error: 2:3-2:3 expected identifier
|
|
// Error: 1:4-1:4 expected identifier
|
|
#[|][Nope]
|
|
|
|
// Pipe wins over parens.
|
|
// Error: 2:6-2:6 expected closing paren
|
|
// Error: 1:9-1:10 expected expression, found closing paren
|
|
#[f (|f )]
|