diff --git a/src-web/components/Editor/twig/twig.grammar b/src-web/components/Editor/twig/twig.grammar index 1d1cc104..a0c2ca6f 100644 --- a/src-web/components/Editor/twig/twig.grammar +++ b/src-web/components/Editor/twig/twig.grammar @@ -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 { @specialize[@name={word}] } - @tokens { - Identifier { @asciiLetter+ } Text { ![{] Text? | "{" (@eof | ![%{] Text?) } space { @whitespace+ } DirectiveContent { ![%}] DirectiveContent? | $[%}] (@eof | ![}] DirectiveContent?) } @@ -25,4 +18,4 @@ kw { @specialize[@name={word}] } "{{" "}}" // "{%" "%}" } -@external propSource twigHighlight from "./twig-highlight.ts" +@external propSource twigHighlight from "./twig-highlight" diff --git a/src-web/components/Editor/twig/twig.ts b/src-web/components/Editor/twig/twig.ts index fc6ca183..5a173501 100644 --- a/src-web/components/Editor/twig/twig.ts +++ b/src-web/components/Editor/twig/twig.ts @@ -1,19 +1,18 @@ // This file was generated by lezer-generator. You probably shouldn't edit it. -import { LRParser } from '@lezer/lr'; -import { twigHighlight } from './twig-highlight'; +import {LRParser} from "@lezer/lr" +import {twigHighlight} from "./twig-highlight" export const parser = LRParser.deserialize({ version: 14, states: "zQVOPOOO_QQO'#C^OOOO'#Cc'#CcQVOPOOOdQQO,58xOOOO-E6a-E6aOOOO1G.d1G.d", - stateData: 'l~OYOS~ORPOUQO~OSSO~OTUO~OYS~', - goto: 'cWPPXPPPP]TQORQRORTR', - nodeNames: '⚠ Template Insert {{ DirectiveContent }} Text', + stateData: "l~OYOS~ORPOUQO~OSSO~OTUO~OYS~", + goto: "cWPPXPPPP]TQORQRORTR", + nodeNames: "⚠ Template Insert {{ DirectiveContent }} Text", maxTerm: 10, propSources: [twigHighlight], skippedNod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S&q;'S;=`'o<%lO&q", tokenizers: [0, 1], - topRules: { Template: [0, 1] }, - tokenPrec: 25, -}); + topRules: {"Template":[0,1]}, + tokenPrec: 25 +}) diff --git a/src-web/components/Editor/widgets.ts b/src-web/components/Editor/widgets.ts index 61b9e547..b394db94 100644 --- a/src-web/components/Editor/widgets.ts +++ b/src-web/components/Editor/widgets.ts @@ -70,7 +70,6 @@ export const placeholders = ViewPlugin.fromClass( this.placeholders = placeholderMatcher.createDeco(view); } update(update: ViewUpdate) { - console.log('VIEW UPDATE', update); this.placeholders = placeholderMatcher.updateDeco(update, this.placeholders); } },