tinymist/syntaxes/textmate/tests/unit/basic/argsOrParams.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

52 lines
No EOL
3.3 KiB
Text

>#let f(x: 1) = [];
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.let.typst storage.type.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst entity.name.function.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.let.typst punctuation.separator.colon.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst constant.numeric.integer.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst
# ^^ source.typst meta.expr.let.typst keyword.operator.assignment.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
>#let f(x: "[]") = [];
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.let.typst storage.type.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst entity.name.function.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.let.typst punctuation.separator.colon.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst string.quoted.double.typst punctuation.definition.string.typst
# ^^ source.typst meta.expr.let.typst string.quoted.double.typst
# ^ source.typst meta.expr.let.typst string.quoted.double.typst punctuation.definition.string.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst
# ^^ source.typst meta.expr.let.typst keyword.operator.assignment.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst
>#let f(x: [x]) = [];
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.let.typst storage.type.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst entity.name.function.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.let.typst punctuation.separator.colon.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst meta.expr.let.typst meta.brace.round.typst
# ^ source.typst meta.expr.let.typst
# ^^ source.typst meta.expr.let.typst keyword.operator.assignment.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst meta.expr.let.typst meta.brace.square.typst
# ^ source.typst punctuation.terminator.statement.typst