diff --git a/syntaxes/textmate/main.ts b/syntaxes/textmate/main.ts index ee5f8700f..d5cfac5d4 100644 --- a/syntaxes/textmate/main.ts +++ b/syntaxes/textmate/main.ts @@ -439,7 +439,7 @@ const expression = (): textmate.Grammar => { }, { match: /\b(and|or|not)\b(?!-)/, - name: "keyword.operator.logical.typst", + name: "keyword.other.logical.typst", }, { match: /\b(return)\b(?!-)/, @@ -462,6 +462,7 @@ const expression = (): textmate.Grammar => { { include: "#primitiveColors" }, { include: "#primitiveFunctions" }, { include: "#primitiveTypes" }, + // todo: enable if only if for completely right grammar { include: "#identifier" }, { include: "#constants" }, { @@ -817,7 +818,7 @@ const letStatement = (): textmate.Grammar => { const letBindingClause: textmate.Pattern = { // name: "meta.let.binding.typst", begin: /(let\b(?!-))\s*/, - end: /(?=[=;\]}])/, + end: /(?=[=;\]}\n])/, beginCaptures: { "1": { name: "storage.type.typst", @@ -912,7 +913,7 @@ const ifStatement = (): textmate.Grammar => { const ifStatement: textmate.Pattern = { name: "meta.expr.if.typst", begin: lookAhead(/(else\s+)?(if\b(?!-))/), - end: /(?<=\}|\])(?!\s*else\b(?!-))/, + end: /(?<=\}|\])(?!\s*else\b(?!-))|(?=[;\}\]\)\n]|$)/, patterns: [ /// Matches any comments { @@ -946,7 +947,7 @@ const ifStatement = (): textmate.Grammar => { const ifClause: textmate.Pattern = { // name: "meta.if.clause.typst", begin: /(?:(\belse)\s+)?(\bif)\s+/, - end: /(?=|<|>|\+|-|\*|\/|=|\+=|-=|\*=|\/=)\s+)(?=[\[\{])|(?=[;\]}]|$)/, + end: /(?=|<|>|\+|-|\*|\/|=|\+=|-=|\*=|\/=)\s*)(?=[\[\{\n])|(?=[;\n\]}]|$)/, beginCaptures: { "1": { name: "keyword.control.conditional.typst", @@ -1028,7 +1029,7 @@ const forStatement = (): textmate.Grammar => { const forStatement: textmate.Pattern = { name: "meta.expr.for.typst", begin: lookAhead(/(for\b(?!-))\s*/), - end: /(?<=[\}\]])(?=\s*[\n\S;\}\]\)])(?!\s*[\{\[])/, + end: /(?<=[\}\]])(?=\s*[\n\S;\}\]\)])(?!\s*[\{\[])|(?=[;\}\]\)\n]|$)/, patterns: [ /// Matches any comments { @@ -1055,7 +1056,7 @@ const forStatement = (): textmate.Grammar => { begin: new RegExp( /(for\b)\s*/.source + `(${BRACE_FREE_EXPR}|${CODE_BLOCK})\\s*(in)\\s*` ), - end: /(?=[;{\[\}\]\)]|$)/, + end: /(?=[;{\[\}\]\)\n]|$)/, beginCaptures: { "1": { name: "keyword.control.loop.typst", @@ -1113,7 +1114,7 @@ const whileStatement = (): textmate.Grammar => { const whileStatement: textmate.Pattern = { name: "meta.expr.while.typst", begin: lookAhead(/(while\b(?!-))/), - end: /(?<=\}|\])/, + end: /(?<=\}|\])|(?=[;\}\]\)\n]|$)/, patterns: [ /// Matches any comments { @@ -1137,7 +1138,7 @@ const whileStatement = (): textmate.Grammar => { const whileClause: textmate.Pattern = { // name: "meta.while.clause.bind.typst", begin: /(while\b)\s*/, - end: /(?=|<|>|\+|-|\*|\/|=|\+=|-=|\*=|\/=)\s+)(?=[\[\{])|(?=[;\}\]\)]|$)/, + end: /(?=|<|>|\+|-|\*|\/|=|\+=|-=|\*=|\/=)\s+)(?=[\[\{])|(?=[;\}\]\)\n]|$)/, beginCaptures: { "1": { name: "keyword.control.loop.typst", @@ -1290,7 +1291,7 @@ const showStatement = (): textmate.Grammar => { const showSelectClause: textmate.Pattern = { // name: "meta.show.clause.select.typst", begin: /(show\b)\s*/, - end: /(?=[:;\}\]])/, + end: /(?=[:;\}\]\n])/, beginCaptures: { "1": { name: "keyword.control.other.typst", diff --git a/syntaxes/textmate/tests/unit/basic/control-flow-for-content.typ.snap b/syntaxes/textmate/tests/unit/basic/control-flow-for-content.typ.snap index 2c8b78c59..276a2b73e 100644 --- a/syntaxes/textmate/tests/unit/basic/control-flow-for-content.typ.snap +++ b/syntaxes/textmate/tests/unit/basic/control-flow-for-content.typ.snap @@ -1,15 +1,15 @@ >#for i #^ source.typst keyword.control.hash.typst -# ^^^^^^ source.typst meta.expr.for.typst +# ^^^^^ source.typst meta.expr.for.typst >#for i in -#^ source.typst meta.expr.for.typst +#^ 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 meta.expr.for.typst +#^ 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 @@ -21,7 +21,7 @@ # ^ 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 meta.expr.for.typst +#^ 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 diff --git a/syntaxes/textmate/tests/unit/basic/control-flow-for.typ.snap b/syntaxes/textmate/tests/unit/basic/control-flow-for.typ.snap index e9eb7205e..e66fa29fb 100644 --- a/syntaxes/textmate/tests/unit/basic/control-flow-for.typ.snap +++ b/syntaxes/textmate/tests/unit/basic/control-flow-for.typ.snap @@ -1,15 +1,15 @@ >#for i #^ source.typst keyword.control.hash.typst -# ^^^^^^ source.typst meta.expr.for.typst +# ^^^^^ source.typst meta.expr.for.typst >#for i in -#^ source.typst meta.expr.for.typst +#^ 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 meta.expr.for.typst +#^ 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 @@ -21,7 +21,7 @@ # ^ 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 meta.expr.for.typst +#^ 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 diff --git a/syntaxes/textmate/tests/unit/basic/control-flow-if-content.typ.snap b/syntaxes/textmate/tests/unit/basic/control-flow-if-content.typ.snap index 554e5fa8f..86f8c96a0 100644 --- a/syntaxes/textmate/tests/unit/basic/control-flow-if-content.typ.snap +++ b/syntaxes/textmate/tests/unit/basic/control-flow-if-content.typ.snap @@ -4,7 +4,7 @@ # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst constant.numeric.integer.typst >#if [] 1 -#^ source.typst meta.expr.if.typst +#^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -12,7 +12,7 @@ # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst constant.numeric.integer.typst >#if [] else [] 1 -#^ source.typst meta.expr.if.typst +#^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst diff --git a/syntaxes/textmate/tests/unit/basic/control-flow-if.typ.snap b/syntaxes/textmate/tests/unit/basic/control-flow-if.typ.snap index 36a1f0528..8399e9d77 100644 --- a/syntaxes/textmate/tests/unit/basic/control-flow-if.typ.snap +++ b/syntaxes/textmate/tests/unit/basic/control-flow-if.typ.snap @@ -4,7 +4,7 @@ # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst constant.numeric.integer.typst >#if {} 1 -#^ source.typst meta.expr.if.typst +#^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -12,7 +12,7 @@ # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst constant.numeric.integer.typst >#if {} else {} 1 -#^ source.typst meta.expr.if.typst +#^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -594,7 +594,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -611,7 +611,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -626,7 +626,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -641,7 +641,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -658,7 +658,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -673,7 +673,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -688,7 +688,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -705,7 +705,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -720,7 +720,7 @@ # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -733,7 +733,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -747,7 +747,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -759,7 +759,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst # ^ source.typst meta.expr.if.typst meta.brace.round.typst @@ -771,7 +771,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -785,7 +785,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -797,7 +797,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst # ^ source.typst meta.expr.if.typst meta.brace.square.typst @@ -809,7 +809,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -823,7 +823,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst @@ -835,7 +835,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst # ^ source.typst meta.expr.if.typst meta.brace.curly.typst diff --git a/syntaxes/textmate/tests/unit/basic/control-flow-while.typ.snap b/syntaxes/textmate/tests/unit/basic/control-flow-while.typ.snap index acc99a2b0..89a968f14 100644 --- a/syntaxes/textmate/tests/unit/basic/control-flow-while.typ.snap +++ b/syntaxes/textmate/tests/unit/basic/control-flow-while.typ.snap @@ -2,12 +2,12 @@ #^ source.typst keyword.control.hash.typst # ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst >#while i -#^ source.typst meta.expr.while.typst +#^ source.typst keyword.control.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 >#while i {} -#^ source.typst meta.expr.while.typst +#^ source.typst keyword.control.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 diff --git a/syntaxes/textmate/tests/unit/editing/for.typ b/syntaxes/textmate/tests/unit/editing/for.typ new file mode 100644 index 000000000..ac15bdc7d --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for.typ @@ -0,0 +1,3 @@ +#for + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for.typ.snap b/syntaxes/textmate/tests/unit/editing/for.typ.snap new file mode 100644 index 000000000..67e6f48e5 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for.typ.snap @@ -0,0 +1,6 @@ +>#for +#^ source.typst keyword.control.hash.typst +# ^^^ source.typst meta.expr.for.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for2.typ b/syntaxes/textmate/tests/unit/editing/for2.typ new file mode 100644 index 000000000..ff22a437d --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for2.typ @@ -0,0 +1,3 @@ +#for i + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for2.typ.snap b/syntaxes/textmate/tests/unit/editing/for2.typ.snap new file mode 100644 index 000000000..6d40e8917 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for2.typ.snap @@ -0,0 +1,6 @@ +>#for i +#^ source.typst keyword.control.hash.typst +# ^^^^^ source.typst meta.expr.for.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for3.typ b/syntaxes/textmate/tests/unit/editing/for3.typ new file mode 100644 index 000000000..0c72c6044 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for3.typ @@ -0,0 +1,3 @@ +#for i in + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for3.typ.snap b/syntaxes/textmate/tests/unit/editing/for3.typ.snap new file mode 100644 index 000000000..7fdc3cbb3 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for3.typ.snap @@ -0,0 +1,11 @@ +>#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 +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for4.typ b/syntaxes/textmate/tests/unit/editing/for4.typ new file mode 100644 index 000000000..4c2ffb660 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for4.typ @@ -0,0 +1,3 @@ +#for i in () + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for4.typ.snap b/syntaxes/textmate/tests/unit/editing/for4.typ.snap new file mode 100644 index 000000000..7f5314f38 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for4.typ.snap @@ -0,0 +1,13 @@ +>#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.round.typst +# ^ source.typst meta.expr.for.typst meta.brace.round.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for5.typ b/syntaxes/textmate/tests/unit/editing/for5.typ new file mode 100644 index 000000000..2d806ed14 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for5.typ @@ -0,0 +1,3 @@ +#{for} + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/for5.typ.snap b/syntaxes/textmate/tests/unit/editing/for5.typ.snap new file mode 100644 index 000000000..3ca622a1c --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/for5.typ.snap @@ -0,0 +1,8 @@ +>#{for} +#^ source.typst keyword.control.hash.typst +# ^ source.typst meta.brace.curly.typst +# ^^^ source.typst meta.expr.for.typst +# ^ source.typst meta.brace.curly.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if.typ b/syntaxes/textmate/tests/unit/editing/if.typ new file mode 100644 index 000000000..ef33821f4 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if.typ @@ -0,0 +1,4 @@ + +#if + +test #a diff --git a/syntaxes/textmate/tests/unit/editing/if.typ.snap b/syntaxes/textmate/tests/unit/editing/if.typ.snap new file mode 100644 index 000000000..25948248d --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if.typ.snap @@ -0,0 +1,10 @@ +> +>#if +#^ source.typst keyword.control.hash.typst +# ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst +> +>test #a +#^^^^^ source.typst +# ^ source.typst variable.other.readwrite.hash.typst +# ^ source.typst variable.other.readwrite.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if2.typ b/syntaxes/textmate/tests/unit/editing/if2.typ new file mode 100644 index 000000000..7752543b8 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if2.typ @@ -0,0 +1,4 @@ + +#if a + +test #a diff --git a/syntaxes/textmate/tests/unit/editing/if2.typ.snap b/syntaxes/textmate/tests/unit/editing/if2.typ.snap new file mode 100644 index 000000000..597b0e2e1 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if2.typ.snap @@ -0,0 +1,12 @@ +> +>#if a +#^ source.typst keyword.control.hash.typst +# ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst +# ^ source.typst meta.expr.if.typst +# ^ source.typst meta.expr.if.typst variable.other.readwrite.typst +> +>test #a +#^^^^^ source.typst +# ^ source.typst variable.other.readwrite.hash.typst +# ^ source.typst variable.other.readwrite.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if3.typ b/syntaxes/textmate/tests/unit/editing/if3.typ new file mode 100644 index 000000000..a13002583 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if3.typ @@ -0,0 +1,3 @@ +#{if} + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if3.typ.snap b/syntaxes/textmate/tests/unit/editing/if3.typ.snap new file mode 100644 index 000000000..59df70b85 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if3.typ.snap @@ -0,0 +1,8 @@ +>#{if} +#^ source.typst keyword.control.hash.typst +# ^ source.typst meta.brace.curly.typst +# ^^ source.typst meta.expr.if.typst +# ^ source.typst meta.brace.curly.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if4.typ b/syntaxes/textmate/tests/unit/editing/if4.typ new file mode 100644 index 000000000..3004d01a8 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if4.typ @@ -0,0 +1,3 @@ +#{if () {} else} + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/if4.typ.snap b/syntaxes/textmate/tests/unit/editing/if4.typ.snap new file mode 100644 index 000000000..5092f64bd --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/if4.typ.snap @@ -0,0 +1,15 @@ +>#{if () {} else} +#^ source.typst keyword.control.hash.typst +# ^ source.typst meta.brace.curly.typst +# ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst +# ^ source.typst meta.expr.if.typst +# ^ source.typst meta.expr.if.typst meta.brace.round.typst +# ^ source.typst meta.expr.if.typst meta.brace.round.typst +# ^ source.typst meta.expr.if.typst +# ^ source.typst meta.expr.if.typst meta.brace.curly.typst +# ^ source.typst meta.expr.if.typst meta.brace.curly.typst +# ^^^^^ source.typst meta.expr.if.typst +# ^ source.typst meta.brace.curly.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/let.typ b/syntaxes/textmate/tests/unit/editing/let.typ new file mode 100644 index 000000000..044c9a91a --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let.typ @@ -0,0 +1,4 @@ + +#let f() + +test diff --git a/syntaxes/textmate/tests/unit/editing/let.typ.snap b/syntaxes/textmate/tests/unit/editing/let.typ.snap new file mode 100644 index 000000000..31ff5a6f6 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let.typ.snap @@ -0,0 +1,12 @@ +> +>#let f() +#^ 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 meta.brace.round.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/let2.typ b/syntaxes/textmate/tests/unit/editing/let2.typ new file mode 100644 index 000000000..b1425bc33 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let2.typ @@ -0,0 +1,4 @@ + +#let + +test diff --git a/syntaxes/textmate/tests/unit/editing/let2.typ.snap b/syntaxes/textmate/tests/unit/editing/let2.typ.snap new file mode 100644 index 000000000..e55cb9c63 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let2.typ.snap @@ -0,0 +1,8 @@ +> +>#let +#^ source.typst keyword.control.hash.typst +# ^^^ source.typst meta.expr.let.typst storage.type.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/let3.typ b/syntaxes/textmate/tests/unit/editing/let3.typ new file mode 100644 index 000000000..9fdad1ace --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let3.typ @@ -0,0 +1,4 @@ + +#let f + +test diff --git a/syntaxes/textmate/tests/unit/editing/let3.typ.snap b/syntaxes/textmate/tests/unit/editing/let3.typ.snap new file mode 100644 index 000000000..30fb008cb --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/let3.typ.snap @@ -0,0 +1,10 @@ +> +>#let f +#^ 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 variable.other.readwrite.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show.typ b/syntaxes/textmate/tests/unit/editing/show.typ new file mode 100644 index 000000000..7c8316d56 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show.typ @@ -0,0 +1,4 @@ + +#show + +test diff --git a/syntaxes/textmate/tests/unit/editing/show.typ.snap b/syntaxes/textmate/tests/unit/editing/show.typ.snap new file mode 100644 index 000000000..0eeb1d0fb --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show.typ.snap @@ -0,0 +1,8 @@ +> +>#show +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show2.typ b/syntaxes/textmate/tests/unit/editing/show2.typ new file mode 100644 index 000000000..d746c29b1 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show2.typ @@ -0,0 +1,4 @@ + +#show: + +test diff --git a/syntaxes/textmate/tests/unit/editing/show2.typ.snap b/syntaxes/textmate/tests/unit/editing/show2.typ.snap new file mode 100644 index 000000000..2c4fbe047 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show2.typ.snap @@ -0,0 +1,9 @@ +> +>#show: +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +# ^ source.typst meta.expr.show.typst punctuation.separator.colon.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show3.typ b/syntaxes/textmate/tests/unit/editing/show3.typ new file mode 100644 index 000000000..4b0946335 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show3.typ @@ -0,0 +1,4 @@ + +#show text + +test diff --git a/syntaxes/textmate/tests/unit/editing/show3.typ.snap b/syntaxes/textmate/tests/unit/editing/show3.typ.snap new file mode 100644 index 000000000..9a589cf16 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show3.typ.snap @@ -0,0 +1,10 @@ +> +>#show text +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +# ^ source.typst meta.expr.show.typst +# ^^^^ source.typst meta.expr.show.typst variable.other.readwrite.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show4.typ b/syntaxes/textmate/tests/unit/editing/show4.typ new file mode 100644 index 000000000..18758aea3 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show4.typ @@ -0,0 +1,4 @@ + +#show text. + +test diff --git a/syntaxes/textmate/tests/unit/editing/show4.typ.snap b/syntaxes/textmate/tests/unit/editing/show4.typ.snap new file mode 100644 index 000000000..3fae0ee96 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show4.typ.snap @@ -0,0 +1,11 @@ +> +>#show text. +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +# ^ source.typst meta.expr.show.typst +# ^^^^ source.typst meta.expr.show.typst variable.other.readwrite.typst +# ^ source.typst meta.expr.show.typst keyword.operator.accessor.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show5.typ b/syntaxes/textmate/tests/unit/editing/show5.typ new file mode 100644 index 000000000..3fd1802c0 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show5.typ @@ -0,0 +1,4 @@ + +#show text.where + +test diff --git a/syntaxes/textmate/tests/unit/editing/show5.typ.snap b/syntaxes/textmate/tests/unit/editing/show5.typ.snap new file mode 100644 index 000000000..9ba3f51e4 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show5.typ.snap @@ -0,0 +1,12 @@ +> +>#show text.where +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +# ^ source.typst meta.expr.show.typst +# ^^^^ source.typst meta.expr.show.typst variable.other.readwrite.typst +# ^ source.typst meta.expr.show.typst keyword.operator.accessor.typst +# ^^^^^ source.typst meta.expr.show.typst variable.other.readwrite.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/show6.typ b/syntaxes/textmate/tests/unit/editing/show6.typ new file mode 100644 index 000000000..0d74f93f8 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show6.typ @@ -0,0 +1,4 @@ + +#show text.where() + +test diff --git a/syntaxes/textmate/tests/unit/editing/show6.typ.snap b/syntaxes/textmate/tests/unit/editing/show6.typ.snap new file mode 100644 index 000000000..3803c2c86 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/show6.typ.snap @@ -0,0 +1,14 @@ +> +>#show text.where() +#^ source.typst keyword.control.hash.typst +# ^^^^ source.typst meta.expr.show.typst keyword.control.other.typst +# ^ source.typst meta.expr.show.typst +# ^^^^ source.typst meta.expr.show.typst variable.other.readwrite.typst +# ^ source.typst meta.expr.show.typst meta.expr.call.typst keyword.operator.accessor.typst +# ^^^^^ source.typst meta.expr.show.typst meta.expr.call.typst entity.name.function.typst +# ^ source.typst meta.expr.show.typst meta.expr.call.typst meta.brace.round.typst +# ^ source.typst meta.expr.show.typst meta.expr.call.typst meta.brace.round.typst +> +>test +#^^^^^ source.typst +> \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while.typ b/syntaxes/textmate/tests/unit/editing/while.typ new file mode 100644 index 000000000..37f1f024c --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while.typ @@ -0,0 +1,3 @@ +#while + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while.typ.snap b/syntaxes/textmate/tests/unit/editing/while.typ.snap new file mode 100644 index 000000000..ad2601ffd --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while.typ.snap @@ -0,0 +1,6 @@ +>#while +#^ source.typst keyword.control.hash.typst +# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while2.typ b/syntaxes/textmate/tests/unit/editing/while2.typ new file mode 100644 index 000000000..2a3d03fa2 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while2.typ @@ -0,0 +1,3 @@ +#while i + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while2.typ.snap b/syntaxes/textmate/tests/unit/editing/while2.typ.snap new file mode 100644 index 000000000..f31cc1e56 --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while2.typ.snap @@ -0,0 +1,8 @@ +>#while i +#^ source.typst keyword.control.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 +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while3.typ b/syntaxes/textmate/tests/unit/editing/while3.typ new file mode 100644 index 000000000..4bedc83bf --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while3.typ @@ -0,0 +1,3 @@ +#{while} + +test \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/editing/while3.typ.snap b/syntaxes/textmate/tests/unit/editing/while3.typ.snap new file mode 100644 index 000000000..43b99177a --- /dev/null +++ b/syntaxes/textmate/tests/unit/editing/while3.typ.snap @@ -0,0 +1,8 @@ +>#{while} +#^ source.typst keyword.control.hash.typst +# ^ source.typst meta.brace.curly.typst +# ^^^^^ source.typst meta.expr.while.typst keyword.control.loop.typst +# ^ source.typst meta.brace.curly.typst +> +>test +#^^^^^ source.typst \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/expr/cond.typ.snap b/syntaxes/textmate/tests/unit/expr/cond.typ.snap index acc0a9fb7..16ff2ad8a 100644 --- a/syntaxes/textmate/tests/unit/expr/cond.typ.snap +++ b/syntaxes/textmate/tests/unit/expr/cond.typ.snap @@ -4,7 +4,7 @@ # ^ source.typst meta.expr.if.typst # ^^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -14,7 +14,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -42,7 +42,7 @@ # ^ source.typst meta.expr.if.typst # ^^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -55,7 +55,7 @@ # ^ source.typst meta.expr.if.typst # ^^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -65,7 +65,7 @@ #^ source.typst keyword.control.hash.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -76,7 +76,7 @@ # ^ source.typst meta.expr.if.typst # ^^ source.typst meta.expr.if.typst keyword.control.conditional.typst # ^ source.typst meta.expr.if.typst -# ^^^ source.typst meta.expr.if.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.if.typst keyword.other.logical.typst # ^ source.typst meta.expr.if.typst # ^^^^ source.typst meta.expr.if.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.if.typst @@ -121,7 +121,7 @@ # ^ source.typst meta.expr.while.typst # ^^^^^ source.typst meta.expr.while.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.while.typst -# ^^^ source.typst meta.expr.while.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.while.typst keyword.other.logical.typst # ^ source.typst meta.expr.while.typst # ^^^^ source.typst meta.expr.while.typst entity.name.type.primitive.typst # ^ source.typst meta.expr.while.typst @@ -157,7 +157,7 @@ # ^ source.typst meta.expr.set.typst # ^^^^^ source.typst meta.expr.set.typst entity.name.type.primitive.typst # ^^^ source.typst meta.expr.set.typst -# ^^^ source.typst meta.expr.set.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.set.typst keyword.other.logical.typst # ^^^^ source.typst meta.expr.set.typst # ^^^^ source.typst meta.expr.set.typst entity.name.type.primitive.typst >#set text(red) if not true @@ -171,7 +171,7 @@ # ^ source.typst meta.expr.set.typst # ^^ source.typst meta.expr.set.typst keyword.control.conditional.typst # ^^^ source.typst meta.expr.set.typst -# ^^^ source.typst meta.expr.set.typst keyword.operator.logical.typst +# ^^^ source.typst meta.expr.set.typst keyword.other.logical.typst # ^^^^^^^^^^ source.typst meta.expr.set.typst # ^^^^ source.typst meta.expr.set.typst entity.name.type.primitive.typst > \ No newline at end of file diff --git a/syntaxes/textmate/tests/unit/expr/in_block.typ.snap b/syntaxes/textmate/tests/unit/expr/in_block.typ.snap index ec50e4286..166d35346 100644 --- a/syntaxes/textmate/tests/unit/expr/in_block.typ.snap +++ b/syntaxes/textmate/tests/unit/expr/in_block.typ.snap @@ -5,7 +5,7 @@ #^^ source.typst # ^^^^^ source.typst entity.name.type.primitive.typst # ^^^^^^^^^^^^^^^^^^^ source.typst -# ^^^ source.typst keyword.operator.logical.typst +# ^^^ source.typst keyword.other.logical.typst # ^^^^^^^^^^^ source.typst # ^^^^ source.typst entity.name.type.primitive.typst # ^ source.typst punctuation.separator.colon.typst @@ -68,7 +68,7 @@ # ^^^^^ source.typst meta.expr.set.typst entity.name.type.primitive.typst > and true #^^ source.typst -# ^^^ source.typst keyword.operator.logical.typst +# ^^^ source.typst keyword.other.logical.typst # ^ source.typst # ^^^^ source.typst entity.name.type.primitive.typst >} diff --git a/syntaxes/textmate/tests/unit/expr/nary.typ.snap b/syntaxes/textmate/tests/unit/expr/nary.typ.snap index 63eb9b6e9..7d774eb7d 100644 --- a/syntaxes/textmate/tests/unit/expr/nary.typ.snap +++ b/syntaxes/textmate/tests/unit/expr/nary.typ.snap @@ -54,12 +54,12 @@ # ^ source.typst meta.brace.round.typst >#not a #^ source.typst keyword.control.hash.typst -# ^^^ source.typst keyword.operator.logical.typst +# ^^^ source.typst keyword.other.logical.typst # ^^^ source.typst >#(not a) #^ source.typst keyword.control.hash.typst # ^ source.typst meta.brace.round.typst -# ^^^ source.typst keyword.operator.logical.typst +# ^^^ source.typst keyword.other.logical.typst # ^ source.typst # ^ source.typst variable.other.readwrite.typst # ^ source.typst meta.brace.round.typst @@ -68,7 +68,7 @@ # ^ source.typst meta.brace.round.typst # ^ source.typst variable.other.readwrite.typst # ^ source.typst -# ^^^ source.typst keyword.operator.logical.typst +# ^^^ source.typst keyword.other.logical.typst # ^ source.typst # ^^^ source.typst support.type.builtin.typst # ^ source.typst meta.brace.round.typst @@ -77,7 +77,7 @@ # ^ source.typst meta.brace.round.typst # ^ source.typst variable.other.readwrite.typst # ^ source.typst -# ^^ source.typst keyword.operator.logical.typst +# ^^ source.typst keyword.other.logical.typst # ^ source.typst # ^^^ source.typst support.type.builtin.typst # ^ source.typst meta.brace.round.typst