1
0
Fork 0
mirror of https://github.com/kou029w/quot.git synced 2025-01-31 06:18:01 +00:00

fixed syntax

This commit is contained in:
Nebel 2022-09-17 16:38:41 +09:00
parent ec7357ee20
commit 0a02a259c3
3 changed files with 15 additions and 20 deletions

View file

@ -1,15 +1,14 @@
@top Document { heading line* }
heading { Heading "\n" }
line { Indent* (AutoLink | Word) (AutoLink | Word | Spaces)* "\n" }
heading { Heading? "\n" }
line { Indent* ((AutoLink | word) space*)* "\n" }
@tokens {
space { $[ \t] }
letter { ![ \t\n]+ }
Heading { letter+ }
letter { ![ \t\n] }
word { letter+ }
Heading { (letter | space)+ }
Indent { space }
Spaces { space+ }
AutoLink { ("http" | "https") "://" letter+ }
Word { letter+ }
@precedence { AutoLink, Word }
AutoLink { ("http" | "https") "://" word }
@precedence { AutoLink, word }
}

View file

@ -2,15 +2,15 @@
import {LRParser} from "@lezer/lr"
export const parser = LRParser.deserialize({
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",
stateData: "!q~OQPO~OZQO~ORROSTOTTO~ORROSXOTXO~OSYOTYOUYOZ[O~OSYOTYOUYOZ_O~OSYOTYOUYOZaO~OST~",
goto: "y]PPPPPPP^dkPPuQVQR]VSSQVRWSQZTQ^XT`Z^TUQV",
nodeNames: "⚠ Document Heading Indent AutoLink Word Spaces",
maxTerm: 12,
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!fOS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RZp'bpq!Rq~'bV'kTQPSU]UOX'bXY!RZp'bpq!Rq~'bV(RVQP]UOXkXY!RZpkpq!Rq![k![!]%p!]~k",
tokenizers: [0, 1, 2],
topRules: {"Document":[0,1]},
tokenPrec: 76
tokenPrec: 82
})

View file

@ -13,7 +13,6 @@ export const quotLanguage = LRLanguage.define({
Heading: t.heading,
Indent: t.separator,
AutoLink: t.link,
Spaces: t.content,
}),
],
}),
@ -35,8 +34,5 @@ export const quotHighlighting = syntaxHighlighting(
tag: t.link,
class: "auto-link",
},
{
tag: t.content,
},
])
);