{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "EFTL", "scopeName": "source.eftl", "patterns": [ { "include": "#comments" }, { "include": "#eftl-block" }, { "include": "#expressions" }, { "include": "#tags" }, { "include": "#control-structures" }, { "include": "#variables" }, { "include": "#functions" }, { "include": "#strings" } ], "repository": { "comments": { "patterns": [ { "name": "comment.block.eftl", "begin": "\\[!--", "end": "--\\]", "captures": { "0": { "name": "punctuation.definition.comment.eftl" } } } ] }, "eftl-block": { "patterns": [ { "name": "meta.block.eftl", "begin": "(\\[EFTL\\])", "end": "(\\[/EFTL\\])", "beginCaptures": { "1": { "name": "keyword.control.eftl.begin" } }, "endCaptures": { "1": { "name": "keyword.control.eftl.end" } }, "patterns": [ { "include": "#comments" }, { "include": "#expressions" }, { "include": "#tags" }, { "include": "#control-structures" }, { "include": "#variables" }, { "include": "#functions" }, { "include": "#header" }, { "include": "#strings" } ] } ] }, "expressions": { "patterns": [ { "name": "meta.expression.output.eftl", "begin": "\\[%=", "end": "%\\]", "beginCaptures": { "0": { "name": "punctuation.section.expression.begin.eftl" } }, "endCaptures": { "0": { "name": "punctuation.section.expression.end.eftl" } }, "patterns": [ { "include": "#expression-content" } ] }, { "name": "meta.expression.eftl", "begin": "\\[%", "end": "%\\]", "beginCaptures": { "0": { "name": "punctuation.section.expression.begin.eftl" } }, "endCaptures": { "0": { "name": "punctuation.section.expression.end.eftl" } }, "patterns": [ { "include": "#expression-content" } ] } ] }, "expression-content": { "patterns": [ { "name": "constant.numeric.eftl", "match": "\\b[0-9]+\\.?[0-9]*\\b" }, { "name": "keyword.operator.assignment.eftl", "match": "=" }, { "name": "keyword.operator.arithmetic.eftl", "match": "([+\\-*%]|/(?!\\]))" }, { "name": "keyword.operator.comparison.eftl", "match": "(!=|==|<=|>=|<|>)" }, { "name": "keyword.operator.logical.eftl", "match": "(&&|\\|\\|)" }, { "name": "constant.language.boolean.eftl", "match": "\\b(true|false)\\b" }, { "name": "variable.other.eftl", "match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" }, { "name": "string.quoted.double.eftl", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.eftl", "match": "\\\\." } ] }, { "name": "punctuation.terminator.statement.eftl", "match": ";" } ] }, "attributes": { "patterns": [ { "comment": "name attribute", "match": "\\b(name)\\b\\s*(=)\\s*(\"(.*?)\")", "captures": { "1": { "name": "entity.other.attribute-name.eftl" }, "2": { "name": "punctuation.separator.key-value.eftl" }, "3": { "name": "string.quoted.double.eftl" }, "4": { "name": "variable.other.eftl" } } }, { "comment": "type attribute", "match": "\\b(type)\\b\\s*(=)\\s*(\"(string|boolean|number|date|object|iterable)\")", "captures": { "1": { "name": "entity.other.attribute-name.eftl" }, "2": { "name": "punctuation.separator.key-value.eftl" }, "3": { "name": "string.quoted.double.eftl" }, "4": { "name": "support.type.primitive.eftl" } } }, { "comment": "generic attribute", "match": "\\b([a-zA-Z_][a-zA-Z0-9_-]*)\\b\\s*(=)\\s*(\"(.*?)\")", "captures": { "1": { "name": "entity.other.attribute-name.eftl" }, "2": { "name": "punctuation.separator.key-value.eftl" }, "3": { "name": "string.quoted.double.eftl" } } } ] }, "tag-open-context": { "patterns": [ { "include": "#attributes" }, { "include": "#expressions" }, { "include": "#functions" }, { "include": "#tags" } ] }, "tags": { "patterns": [ { "name": "meta.tag.block.eftl", "begin": "(\\[)(TAG)(?:\\s+[^\\x00]*?)?(?