// This is a TextMate grammar distributed by `starry-night`. // This grammar is developed at // // and licensed `apache-2.0`. // See for more info. /** * @import {Grammar} from '@wooorm/starry-night' */ /** @type {Grammar} */ const grammar = { dependencies: ['source.java', 'text.html.basic'], extensions: ['.jte'], names: ['java-template-engine', 'jte'], patterns: [ {include: '#jte-keyword'}, {include: '#jte-comment'}, {include: '#jte-statement'}, {include: '#jte-declaration'}, {include: '#jte-comparison'}, {include: '#html_tags'}, {include: 'text.html.basic'} ], repository: { entities: { patterns: [ { captures: { 1: {name: 'punctuation.definition.entity.html'}, 3: {name: 'punctuation.definition.entity.html'} }, match: '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)', name: 'constant.character.entity.html' }, {match: '&', name: 'invalid.illegal.bad-ampersand.html'} ] }, 'escaped-double-quote': { match: '\\\\"', name: 'constant.character.escape.js' }, 'escaped-single-quote': { match: "\\\\'", name: 'constant.character.escape.js' }, html_tags: { patterns: [ { begin: '(<)([a-zA-Z0-9:-]+)(?=[^>]*>)', beginCaptures: { 1: {name: 'punctuation.definition.tag.html'}, 2: {name: 'entity.name.tag.html'} }, end: '(>(<)/)(\\2)(>)', endCaptures: { 1: {name: 'punctuation.definition.tag.html'}, 2: {name: 'meta.scope.between-tag-pair.html'}, 3: {name: 'entity.name.tag.html'}, 4: {name: 'punctuation.definition.tag.html'} }, name: 'meta.tag.any.html', patterns: [{include: '#tag-stuff'}] }, { begin: '(<\\?)(xml)', captures: { 1: {name: 'punctuation.definition.tag.html'}, 2: {name: 'entity.name.tag.xml.html'} }, end: '(\\?>)', name: 'meta.tag.preprocessor.xml.html', patterns: [{include: '#tag_generic_attribute'}, {include: '#string'}] }, { begin: '