typst/tests/typ/code/dict.typ
Laurenz 9950627789 Even shorter error annotations
Error annotations are now relative to the first following non-comment line.
2021-07-09 10:50:25 +02:00

21 lines
448 B
XML

// Test dictionaries.
---
// Empty
{(:)}
// Two pairs.
{(a1: 1, a2: 2)}
---
// Simple expression after already being identified as a dictionary.
// Error: 9-10 expected named pair, found expression
{(a: 1, b)}
// Identified as dictionary due to initial colon.
// Error: 4-5 expected named pair, found expression
// Error: 5 expected comma
// Error: 12-16 expected identifier
// Error: 17-18 expected expression, found colon
{(:1 b:"", true::)}