mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 07:41:22 +02:00
Fix dollar sign in Twig grammar
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { styleTags, tags as t } from '@lezer/highlight';
|
import { styleTags, tags as t } from '@lezer/highlight';
|
||||||
|
|
||||||
export const highlight = styleTags({
|
export const highlight = styleTags({
|
||||||
Open: t.tagName,
|
TagOpen: t.tagName,
|
||||||
Close: t.tagName,
|
TagClose: t.tagName,
|
||||||
Content: t.keyword,
|
TagContent: t.keyword,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
@top Template { (Tag | Text)* }
|
@top Template { (Tag | Text)* }
|
||||||
|
|
||||||
@local tokens {
|
@local tokens {
|
||||||
Close { "]}" }
|
TagClose { "]}" }
|
||||||
@else Content
|
@else TagContent
|
||||||
}
|
}
|
||||||
|
|
||||||
@skip { } {
|
@skip { } {
|
||||||
Open { "${[" }
|
TagOpen { "${[" }
|
||||||
Tag { Open (Content)+ Close }
|
Tag { TagOpen (TagContent)+ TagClose }
|
||||||
}
|
}
|
||||||
|
|
||||||
@tokens {
|
@tokens {
|
||||||
Text { ![$] Text? }
|
Text { ![$] Text? | "$" (@eof | ![{] Text?) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@external propSource highlight from "./highlight"
|
@external propSource highlight from "./highlight"
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
||||||
export const
|
export const Template = 1,
|
||||||
Template = 1,
|
|
||||||
Tag = 2,
|
Tag = 2,
|
||||||
|
TagContent = 4,
|
||||||
Open = 3,
|
Open = 3,
|
||||||
Content = 4,
|
|
||||||
Close = 5,
|
Close = 5,
|
||||||
Text = 6
|
Text = 6;
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ export const parser = LRParser.deserialize({
|
|||||||
states: "!^QQOPOOOOOO'#C_'#C_OYOQO'#C^OOOO'#Cc'#CcQQOPOOOOOO'#Cd'#CdO_OQO,58xOOOO-E6a-E6aOOOO-E6b-E6bOOOO1G.d1G.d",
|
states: "!^QQOPOOOOOO'#C_'#C_OYOQO'#C^OOOO'#Cc'#CcQQOPOOOOOO'#Cd'#CdO_OQO,58xOOOO-E6a-E6aOOOO-E6b-E6bOOOO1G.d1G.d",
|
||||||
stateData: "g~OUROYPO~OSTO~OSTOTXO~O",
|
stateData: "g~OUROYPO~OSTO~OSTOTXO~O",
|
||||||
goto: "nXPPY^PPPbhTROSTQOSQSORVSQUQRWU",
|
goto: "nXPPY^PPPbhTROSTQOSQSORVSQUQRWU",
|
||||||
nodeNames: "⚠ Template Tag Open Content Close Text",
|
nodeNames: "⚠ Template Tag TagOpen TagContent TagClose Text",
|
||||||
maxTerm: 10,
|
maxTerm: 10,
|
||||||
propSources: [highlight],
|
propSources: [highlight],
|
||||||
skippedNodes: [0],
|
skippedNodes: [0],
|
||||||
repeatNodeCount: 2,
|
repeatNodeCount: 2,
|
||||||
tokenData: "![~RTOtbtuyu;'Sb;'S;=`s<%lOb~gSU~Otbu;'Sb;'S;=`s<%lOb~vP;=`<%lb~|P#o#p!P~!SP!}#O!V~![OY~",
|
tokenData: "#]~RTOtbtu!hu;'Sb;'S;=`!]<%lOb~gTU~Otbtuvu;'Sb;'S;=`!]<%lOb~yUO#ob#p;'Sb;'S;=`!]<%l~b~Ob~~!c~!`P;=`<%lb~!hOU~~!kVO#ob#o#p#Q#p;'Sb;'S;=`!]<%l~b~Ob~~!c~#TP!}#O#W~#]OY~",
|
||||||
tokenizers: [1, new LocalTokenGroup("b~RP#P#QU~XP#q#r[~aOT~~", 17, 4)],
|
tokenizers: [1, new LocalTokenGroup("b~RP#P#QU~XP#q#r[~aOT~~", 17, 4)],
|
||||||
topRules: {"Template":[0,1]},
|
topRules: {"Template":[0,1]},
|
||||||
tokenPrec: 0
|
tokenPrec: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user