fix code highlight

This commit is contained in:
Daniel Bulant 2024-02-17 15:36:22 +01:00
parent b7aece5302
commit 2d08b95777
2 changed files with 4 additions and 3 deletions

View file

@ -101,7 +101,7 @@ Column {
} }
Field { Field {
expression ("as" identifier)? | expression ("as" identifier)? |
"*" Star
} }
BinaryExpression { BinaryExpression {
expression !and And expression | expression !and And expression |
@ -112,7 +112,7 @@ BinaryExpression {
expression !exp Raise expression | expression !exp Raise expression |
expression !times (DivideOrMultiply) expression | expression !times (DivideOrMultiply) expression |
expression !plus (AddOrSubtract) expression | expression !plus (AddOrSubtract) expression |
expression !dot (("." "*")+ | ("." "*")* "." expression) | expression !dot (("." Star)+ | ("." Star)* "." expression) |
expression? !dot "->" expression | expression? !dot "->" expression |
expression !array ("[" expression "]") expression !array ("[" expression "]")
} }
@ -296,6 +296,7 @@ statement[@isGroup=Statement] {
Subtract { "-" } Subtract { "-" }
AddOrSubtract { Add | Subtract } AddOrSubtract { Add | Subtract }
Raise { "**" } Raise { "**" }
Star { "*" }
Escape { Escape {
"\\" ("x" hex hex | "u" ("{" hex+ "}" | hex hex hex hex) | ![xu]) "\\" ("x" hex hex | "u" ("{" hex+ "}" | hex hex hex hex) | ![xu])

View file

@ -25,7 +25,7 @@ export let parser = baseParser.configure({
Namespace: t.namespace, Namespace: t.namespace,
FunctionName: t.function(t.variableName), FunctionName: t.function(t.variableName),
Variable: t.variableName, Variable: t.variableName,
"*": t.atom, Star: t.atom,
Integer: t.integer, Integer: t.integer,
"Decimal Float": t.float, "Decimal Float": t.float,
Duration: t.number, Duration: t.number,