tinymist/syntaxes/textmate/tests/unit/basic/control-flow-while.typ.snap
Myriad-Dreamin 2e7c7732dc
feat: mark correct expression boundary on all testing files from typst/typst (#85)
* fix: comment and set rules

* fix: losen for rules

* fix: chore field, escape

* fix: hash termination

* dev: handle math mode

* fix: terminate expressions on right braces

* dev: match spread operator

* dev: remove complex check on if

* dev: add two bugs

* dev: fix if/while conditions

* fix: terminate expressions on right braces 2
2024-03-23 01:19:43 +08:00

130 lines
No EOL
6.4 KiB
Text

>#while
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
>#while i
#^ source.typst meta.expr.while.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
>#while i {}
#^ source.typst meta.expr.while.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
>#while i []
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
>#while i {}1
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^^ source.typst
>#while i []a
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^^ source.typst
>#while i {} 1
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^^^ source.typst
>#while i [] a
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^^^ source.typst
>#while i {};1
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst punctuation.terminator.statement.typst
# ^^ source.typst
>#while i [];a
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
# ^^ source.typst
>#while i {} {}
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^^^^ source.typst
>#while i [] []
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^^^^ source.typst
>#while i [] {}
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^^^^ source.typst
>
>#while i {}
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
# ^ source.typst meta.expr.while.typst meta.brace.curly.typst
>1
#^^ source.typst
>
>#while i []
#^ source.typst punctuation.definition.hash.typst
# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.while.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
# ^ source.typst meta.expr.while.typst meta.brace.square.typst
>1
#^^ source.typst
>