tinymist/syntaxes/textmate/tests/unit/basic/control-flow-for-content.typ.snap
Myriad-Dreamin b1efa88161
feat: improve syntax highlighting (#724)
* dev: simplify if statement handling

* dev: parse blocks in if/for/while more consistently

* feat: improve context expression parsing

* feat: improve context expression parsing

* feat: improve parameter clause parsing
2024-10-22 21:41:20 +08:00

192 lines
No EOL
12 KiB
Text

>#for i
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
>#for i in
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
>#for i in range(1)
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
>#for i in range(1) []
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
>#for i in []
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
>#for i in []; 1
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
# ^^^ source.typst
>#for i in range(1) []; 1
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
# ^^^ source.typst
>#for i in range(1) []1
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^^ source.typst
>#for i in range(1) []a
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^^ source.typst
>#for i in range(1) [] 1
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^^^ source.typst
>#for i in range(1) [] a
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^^^ source.typst
>#for i in range(1) []
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
>#for i in range(1) []; []
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
# ^^^^ source.typst
>#for i in range(1) [] []
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.for.typst keyword.control.loop.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.for.typst
# ^^ source.typst meta.expr.for.typst keyword.operator.range.typst
# ^ source.typst meta.expr.for.typst
# ^^^^^ source.typst meta.expr.for.typst meta.expr.call.typst entity.name.function.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.for.typst meta.expr.call.typst meta.brace.round.typst
# ^ source.typst meta.expr.for.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^ source.typst meta.expr.for.typst meta.brace.square.typst
# ^^^^ source.typst
>1
#^^ source.typst