mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-06 14:56:23 +01:00
Small tweaks
This commit is contained in:
1 parent
5658da34a2
commit
83f84ded8d
3 files changed
+10
-19
No files matched your search
@@ -3,21 +3,14 @@
|
||||
@top Template { (directive | Text)* }
|
||||
|
||||
directive {
|
||||
// Insert |
|
||||
// Conditional { ConditionalOpen (directive | Text)* ConditionalClose }
|
||||
Insert
|
||||
}
|
||||
|
||||
@skip {space} {
|
||||
Insert { "{{" DirectiveContent "}}" }
|
||||
// ConditionalOpen { "{%" kw<"if"> DirectiveContent "%}" }
|
||||
// ConditionalClose { "{%" kw<"endif"> "%}" }
|
||||
}
|
||||
|
||||
kw<word> { @specialize[@name={word}]<Identifier, word> }
|
||||
|
||||
@tokens {
|
||||
Identifier { @asciiLetter+ }
|
||||
Text { ![{] Text? | "{" (@eof | ![%{] Text?) }
|
||||
space { @whitespace+ }
|
||||
DirectiveContent { ![%}] DirectiveContent? | $[%}] (@eof | ![}] DirectiveContent?) }
|
||||
@@ -25,4 +18,4 @@ kw<word> { @specialize[@name={word}]<Identifier, word> }
|
||||
"{{" "}}" // "{%" "%}"
|
||||
}
|
||||
|
||||
@external propSource twigHighlight from "./twig-highlight.ts"
|
||||
@external propSource twigHighlight from "./twig-highlight"
|
||||
Reference in new issue
Block a user