mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
Some small tweaks
This commit is contained in:
@@ -7,16 +7,16 @@ import { completeFromList } from '@codemirror/autocomplete';
|
||||
const parserWithMetadata = parser.configure({
|
||||
props: [
|
||||
styleTags({
|
||||
ProtocolName: t.comment,
|
||||
Slashy: t.comment,
|
||||
Protocol: t.comment,
|
||||
Port: t.attributeName,
|
||||
Host: t.variableName,
|
||||
Slash: t.comment,
|
||||
PathSegment: t.bool,
|
||||
QueryName: t.variableName,
|
||||
QueryValue: t.string,
|
||||
Question: t.comment,
|
||||
Equal: t.comment,
|
||||
Slash: t.bool,
|
||||
Question: t.attributeName,
|
||||
QueryName: t.attributeName,
|
||||
QueryValue: t.attributeName,
|
||||
Amp: t.comment,
|
||||
Equal: t.comment,
|
||||
}),
|
||||
// indentNodeProp.add({
|
||||
// Application: (context) => context.column(context.node.from) + context.unit,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@top url { Protocol Host Path Query }
|
||||
@top url { Protocol Host Port? Path Query }
|
||||
|
||||
Protocol {
|
||||
ProtocolName Slashy
|
||||
"http://" | "https://"
|
||||
}
|
||||
|
||||
Path {
|
||||
@@ -17,12 +17,11 @@ QueryPair {
|
||||
}
|
||||
|
||||
@tokens {
|
||||
ProtocolName { "http" | "https" }
|
||||
Port { ":" $[0-9]+ }
|
||||
Host { $[a-zA-Z0-9-_.]+ }
|
||||
QueryName { $[a-zA-Z0-9-_.]+ }
|
||||
QueryValue { $[a-zA-Z0-9-_.]+ }
|
||||
QueryValue { $[a-zA-Z0-9-_./]+ }
|
||||
PathSegment { $[a-zA-Z0-9-_.]+ }
|
||||
Slashy { "://" }
|
||||
Slash { "/" }
|
||||
Question { "?" }
|
||||
Equal { "=" }
|
||||
|
||||
@@ -2,16 +2,15 @@
|
||||
export const
|
||||
url = 1,
|
||||
Protocol = 2,
|
||||
ProtocolName = 3,
|
||||
Slashy = 4,
|
||||
Host = 5,
|
||||
Path = 6,
|
||||
Slash = 7,
|
||||
PathSegment = 8,
|
||||
Query = 9,
|
||||
Question = 10,
|
||||
QueryPair = 11,
|
||||
Amp = 12,
|
||||
QueryName = 13,
|
||||
Equal = 14,
|
||||
QueryValue = 15
|
||||
Host = 3,
|
||||
Port = 4,
|
||||
Path = 5,
|
||||
Slash = 6,
|
||||
PathSegment = 7,
|
||||
Query = 8,
|
||||
Question = 9,
|
||||
QueryPair = 10,
|
||||
Amp = 11,
|
||||
QueryName = 12,
|
||||
Equal = 13,
|
||||
QueryValue = 14
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
import {LRParser} from "@lezer/lr"
|
||||
export const parser = LRParser.deserialize({
|
||||
version: 14,
|
||||
states: "#xOQOPOOOVOPO'#C^O[OQOOOOOO,58x,58xOaOPOOOiOSO'#ClOnOPO'#CbOvOPOOOOOO,59W,59WOOOO-E6j-E6jO{OWO'#CeQOOOOOO!WOPO'#CgO!]OWO'#CgOOOO'#Cm'#CmO!bOWO,59PO!mO`O,59RO!rOPO,59ROOOO-E6k-E6kOOOO1G.m1G.mO!wO`O1G.mOOOO7+$X7+$X",
|
||||
stateData: "!|~ORPO~OSRO~OTSO~OVTOYUP~OWWO~OVTOYUX~OYYO~O[]O][ObXX~O^`O~O]aO~O[]O][ObXa~O_cO~O^dO~O_eO~O",
|
||||
goto: "|bPPcPPPfPPiPlPPPPpvRQORVSRZVT^Y_QUSRXUQ_YRb_",
|
||||
nodeNames: "⚠ url Protocol ProtocolName Slashy Host Path Slash PathSegment Query Question QueryPair Amp QueryName Equal QueryValue",
|
||||
maxTerm: 18,
|
||||
states: "#xOQOPOOOOOO'#C^'#C^OYOQOOO_OPOOOjOSO'#CkOoOPO'#CaOwOPOOObOPOOOOOO,59V,59VOOOO-E6i-E6iO|OWO'#CdQOOOOOO!XOPO'#CfO!^OWO'#CfOOOO'#Cl'#ClO!cOWO,59OO!nO`O,59QO!sOPO,59QOOOO-E6j-E6jOOOO1G.l1G.lO!xO`O1G.lOOOO7+$W7+$W",
|
||||
stateData: "!}~ObPOcPO~ORRO~OSVOUSOXTP~OVWO~OUSOXTX~OXYO~OZ]O[[OaWX~O]`O~O[aO~OZ]O[[OaWa~O^cO~O]dO~O^eO~O",
|
||||
goto: "}aPPbPPePPiPlPPPPpwRQOTURVRZUT^Y_STRVRXTQ_YRb_",
|
||||
nodeNames: "⚠ url Protocol Host Port Path Slash PathSegment Query Question QueryPair Amp QueryName Equal QueryValue",
|
||||
maxTerm: 19,
|
||||
skippedNodes: [0],
|
||||
repeatNodeCount: 2,
|
||||
tokenData: "'T~R]vwz}!O!P!O!P!P!P!Q!n!Q![!P![!]!s!_!`#U!a!b#Z!c!}!P#R#S!P#T#[!P#[#]#`#]#o!P~!PO[~n![UTQWS]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#o!P~!sOV~~!vP!P!Q!y~!|P!P!Q#P~#UOS~~#ZO^~~#`OY~o#kWTQWS]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#h!P#h#i$T#i#o!Po$`WTQWS]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#h!P#h#i$x#i#o!Po%TWTQWS]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#d!P#d#e%m#e#o!Po%zWTQWSRP]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#g!P#g#h&d#h#o!Po&qUTQWSRP]W_`}!O!P!O!P!P!Q![!P!c!}!P#R#S!P#T#o!P",
|
||||
tokenData: ")]~R]vwz}!O!P!O!P!P!P!Q#]!Q![!P![!]#y!_!`$X!a!b$^!c!}!P#R#S!P#T#[!P#[#]$c#]#o!P~!POZ~n![VRQVS[W^`}!O!P!O!P!P!P!Q!q!Q![!P!c!}!P#R#S!P#T#o!P`!vV^`}!O!q!O!P!q!P!Q!q!Q![!q!c!}!q#R#S!q#T#o!qa#dV^`UP}!O!q!O!P!q!P!Q!q!Q![!q!c!}!q#R#S!q#T#o!q~#|P!Q![$P~$UPS~!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