mirror of
https://github.com/kou029w/quot.git
synced 2025-01-31 06:18:01 +00:00
fixed syntax
This commit is contained in:
parent
ec7357ee20
commit
0a02a259c3
3 changed files with 15 additions and 20 deletions
|
@ -1,15 +1,14 @@
|
||||||
@top Document { heading line* }
|
@top Document { heading line* }
|
||||||
|
|
||||||
heading { Heading "\n" }
|
heading { Heading? "\n" }
|
||||||
line { Indent* (AutoLink | Word) (AutoLink | Word | Spaces)* "\n" }
|
line { Indent* ((AutoLink | word) space*)* "\n" }
|
||||||
|
|
||||||
@tokens {
|
@tokens {
|
||||||
space { $[ \t] }
|
space { $[ \t] }
|
||||||
letter { ![ \t\n]+ }
|
letter { ![ \t\n] }
|
||||||
Heading { letter+ }
|
word { letter+ }
|
||||||
|
Heading { (letter | space)+ }
|
||||||
Indent { space }
|
Indent { space }
|
||||||
Spaces { space+ }
|
AutoLink { ("http" | "https") "://" word }
|
||||||
AutoLink { ("http" | "https") "://" letter+ }
|
@precedence { AutoLink, word }
|
||||||
Word { letter+ }
|
|
||||||
@precedence { AutoLink, Word }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
import {LRParser} from "@lezer/lr"
|
import {LRParser} from "@lezer/lr"
|
||||||
export const parser = LRParser.deserialize({
|
export const parser = LRParser.deserialize({
|
||||||
version: 14,
|
version: 14,
|
||||||
states: "#`OQOPOOOVOPOOQ[OQOOOOOO'#Cd'#CdOgOQO'#ChOrOSO'#ChOOOO'#Cc'#CcQ[OQOOOOOO-E6b-E6bO!QOSO,59SOOOO'#Ce'#CeO!QOSO,59SOOOO,59S,59SOOOO-E6a-E6aO!`OSO1G.nOOOO1G.n1G.nOOOO-E6c-E6cOOOO7+$Y7+$Y",
|
states: "#rOQOPOOOOOO'#Cf'#CfOYOPO'#CfQ_OQOOOOOO,59Q,59QOOOO'#Cb'#CbOmOQO'#ChO{OSO'#CcOpOQO'#ChOOOO'#Ch'#ChOOOO'#Ca'#CaQ_OQOOOOOO-E6`-E6`O!ZOQO,59SOOOO,59S,59SOOOO'#Cd'#CdO!fOSO,58}OOOO-E6a-E6aOOOO-E6_-E6_OOOO1G.n1G.nOOOO-E6b-E6b",
|
||||||
stateData: "!q~OQPO~OZQO~ORROSTOTTO~ORROSXOTXO~OSYOTYOUYOZ[O~OSYOTYOUYOZ_O~OSYOTYOUYOZaO~OST~",
|
stateData: "!w~OQQOZPO~OZSO~ORTOSVOZXO]VO~ORTOSVOZ^O]VO~O^_OSVXZVX]VX~OSVOZcO]VO~O^_OSVaZVa]Va~OS]~",
|
||||||
goto: "y]PPPPPPP^dkPPuQVQR]VSSQVRWSQZTQ^XT`Z^TUQV",
|
goto: "!T]PPPPP^dkvP|P!PQZRRbZSURZR[USWRZQ]UTaW]Q`VRd`RROTYRZ",
|
||||||
nodeNames: "⚠ Document Heading Indent AutoLink Word Spaces",
|
nodeNames: "⚠ Document Heading Indent AutoLink",
|
||||||
maxTerm: 12,
|
maxTerm: 14,
|
||||||
skippedNodes: [0],
|
skippedNodes: [0],
|
||||||
repeatNodeCount: 3,
|
repeatNodeCount: 4,
|
||||||
tokenData: "&t~RWOXkXY{YZ!eZpkpq{q#[k#[#]!j#]~kVrRQPTUOXkZpkq~kU!SQRQUSXY!Ypq!YS!_QUSXY!Ypq!Y~!jOZ~V!qTQPTUOXkZpkq#hk#h#i#Q#i~kV#XTQPTUOXkZpkq#hk#h#i#h#i~kV#oTQPTUOXkZpkq#dk#d#e$O#e~kV$VVQPTUOXkZpkq![k![!]$l!]#gk#g#h&^#h~kV$sTQPTUOXkZpkq!Pk!P!Q%S!Q~kV%ZTQPTUOXkZpkq!Pk!P!Q%j!Q~kV%qRQPTUOX%zZp%zq~%zV&TRQPSUTUOX%zZp%zq~%zV&eTQPTUOXkZpkq![k![!]$l!]~k",
|
tokenData: "(h~RWOXkXY!gYZ#PZpkpq!gq#[k#[#]#U#]~kVrTQP]UOXkXY!RZpkpq!Rq~kP!WTQPOX!RXY!RZp!Rpq!Rq~!RV!pTQPRQ^SOX!RXY!RZp!Rpq!Rq~!R~#UOZ~V#]VQP]UOXkXY!RZpkpq!Rq#hk#h#i#r#i~kV#yVQP]UOXkXY!RZpkpq!Rq#hk#h#i$`#i~kV$gVQP]UOXkXY!RZpkpq!Rq#dk#d#e$|#e~kV%TXQP]UOXkXY!RZpkpq!Rq![k![!]%p!]#gk#g#h'z#h~kV%wVQP]UOXkXY!RZpkpq!Rq!Pk!P!Q&^!Q~kV&eVQP]UOXkXY!RZpkpq!Rq!Pk!P!Q&z!Q~kV'RTQP]UOX'bXY!RZp'bpq!Rq~'bV'kTQPSU]UOX'bXY!RZp'bpq!Rq~'bV(RVQP]UOXkXY!RZpkpq!Rq![k![!]%p!]~k",
|
||||||
tokenizers: [0, 1, 2],
|
tokenizers: [0, 1, 2],
|
||||||
topRules: {"Document":[0,1]},
|
topRules: {"Document":[0,1]},
|
||||||
tokenPrec: 76
|
tokenPrec: 82
|
||||||
})
|
})
|
||||||
|
|
|
@ -13,7 +13,6 @@ export const quotLanguage = LRLanguage.define({
|
||||||
Heading: t.heading,
|
Heading: t.heading,
|
||||||
Indent: t.separator,
|
Indent: t.separator,
|
||||||
AutoLink: t.link,
|
AutoLink: t.link,
|
||||||
Spaces: t.content,
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
@ -35,8 +34,5 @@ export const quotHighlighting = syntaxHighlighting(
|
||||||
tag: t.link,
|
tag: t.link,
|
||||||
class: "auto-link",
|
class: "auto-link",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
tag: t.content,
|
|
||||||
},
|
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue