remove half working fortran and html_twig

This commit is contained in:
nightwing 2013-04-06 13:13:54 +04:00
commit ab1ed57d55
7 changed files with 1 additions and 1031 deletions

View file

@ -140,7 +140,6 @@ var docs = {
"docs/actionscript.as": "ActionScript",
"docs/erlang/erl": "Erlang",
"docs/forth.frt": "Forth",
"docs/fortran.f95": "Fortran",
"docs/haskell.hs": "Haskell",
"docs/julia.js": "Julia",
"docs/prolog/plg": "Prolog",

View file

@ -1,28 +0,0 @@
! sum.f90
! Performs summations using in a loop using EXIT statement
! Saves input information and the summation in a data file
program summation
implicit none
integer :: sum, a
print*, "This program performs summations. Enter 0 to stop."
open(unit=10, file="SumData.DAT")
sum = 0
do
print*, "Add:"
read*, a
if (a == 0) then
exit
else
sum = sum + a
end if
write(10,*) a
end do
print*, "Summation =", sum
write(10,*) "Summation =", sum
close(10)

View file

@ -110,13 +110,10 @@ var modesByName = {
actionscript: ["ActionScript" ,"as"],
erlang: ["Erlang" ,"erl|hrl"],
forth: ["Forth", ,"frt|fs|ldr"],
fortran_modern: ["Fortran - Modern", ,"f90|F90|f95|F95|f03|F03|f08|F08"],
haskell: ["Haskell", "hs"],
julia: ["Julia", "jl"],
prolog: ["Prolog", "plg|prolog"],
rust: ["Rust", "rs|rc"]
rust: ["Rust", "rs"]
};
for (var name in modesByName) {

View file

@ -1,64 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* Contributor(s):
*
*
*
* ***** END LICENSE BLOCK ***** */
/*
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
*/
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var FortranModernHighlightRules = require("./fortran_modern_highlight_rules").FortranModernHighlightRules;
// TODO: pick appropriate fold mode
var FoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
var highlighter = new FortranModernHighlightRules();
this.foldingRules = new FoldMode();
this.$tokenizer = new Tokenizer(highlighter.getRules());
};
oop.inherits(Mode, TextMode);
(function() {
this.lineCommentStart = "!";
this.blockComment = {start: "/*", end: "*/"};
// Extra logic goes here.
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -1,187 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/* This file was autogenerated from tm bundles\fortran.tmbundle\Syntaxes\Fortran - Modern.tmLanguage (uuid: ) */
/****************************************************************************************
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
* fileTypes *
****************************************************************************************/
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var FortranModernHighlightRules = function() {
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
this.$rules = { start:
[ { include: 'source.fortran' },
{ todo:
{ token:
[ 'meta.function.interface.operator.fortran.modern',
'storage.type.function.fortran',
'meta.function.interface.operator.fortran.modern',
'storage.type.fortran',
'meta.function.interface.operator.fortran.modern',
'keyword.operator.fortran',
'meta.function.interface.operator.fortran.modern' ],
regex: '^(\\s*)(interface)(\\s+)(operator|assignment)(\\()(\\.[a-zA-Z0-9_]+\\.|[\\+\\-\\=\\/\\*]+)(\\))',
caseInsensitive: true,
push:
[ { token:
[ 'keyword.other.fortran',
'meta.function.interface.operator.fortran.modern',
'storage.type.function.fortran' ],
regex: '(end)(\\s*)((?:interface)?)',
caseInsensitive: true,
next: 'pop' },
{ include: '$self' },
{ defaultToken: 'meta.function.interface.operator.fortran.modern' } ] },
comment: 'Interface declaration of operator/assignments' },
{ todo:
{ token:
[ 'meta.function.interface.fortran.modern',
'storage.type.function.fortran',
'meta.function.interface.fortran.modern',
'entity.name.function.fortran' ],
regex: '^(\\s*)(interface)(\\s+)([A-Za-z_][A-Za-z0-9_]*)',
caseInsensitive: true,
push:
[ { token:
[ 'keyword.other.fortran',
'meta.function.interface.fortran.modern',
'storage.type.function.fortran' ],
regex: '(end)(\\s*)((?:interface)?)',
caseInsensitive: true,
next: 'pop' },
{ include: '$self' },
{ defaultToken: 'meta.function.interface.fortran.modern' } ] },
comment: 'Interface declaration of function/subroutines' },
{ todo:
{ token:
[ 'meta.type-definition.fortran.modern',
'storage.type.fortran.modern',
'meta.type-definition.fortran.modern',
'entity.name.type.fortran.modern' ],
regex: '^(\\s*)(type)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)',
caseInsensitive: true,
push:
[ { token:
[ 'keyword.other.fortran',
'meta.type-definition.fortran.modern',
'storage.type.fortran.modern',
'entity.name.type.end.fortran.modern' ],
regex: '(end)(\\s*)(?:(type))?((?:\\s+[A-Za-z_][A-Za-z0-9_]*)?)',
caseInsensitive: true,
next: 'pop' },
{ include: '$self' },
{ defaultToken: 'meta.type-definition.fortran.modern' } ] },
comment: 'Type definition' },
{ token: 'punctuation.definition.comment.fortran',
regex: '!-',
push:
[ { token: 'comment.line.exclamation.mark.fortran.modern',
regex: '$',
next: 'pop' },
{ token: 'text', regex: '\\\\\\s*$' },
{ defaultToken: 'comment.line.exclamation.mark.fortran.modern' } ] },
{ token: 'punctuation.definition.comment.fortran',
regex: '!',
push:
[ { token: 'comment.line.exclamation.fortran.modern',
regex: '$',
next: 'pop' },
{ token: 'text', regex: '\\\\\\s*$' },
{ defaultToken: 'comment.line.exclamation.fortran.modern' } ] },
{ token: 'keyword.control.fortran.modern',
regex: '\\b(?:select\\s+case|case(?:\\s+default)?|end\\s+select|use|(?:end\\s+)?forall)\\b',
caseInsensitive: true,
comment: 'statements controling the flow of the program' },
{ token: 'keyword.control.io.fortran.modern',
regex: '\\b(?:access|action|advance|append|apostrophe|asis|blank|delete|delim|direct|end|eor|err|exist|file|fmt|form|formatted|iolength|iostat|keep|name|named|nextrec|new|nml|no|null|number|old|opened|pad|position|quote|read|readwrite|rec|recl|replace|scratch|sequential|size|status|undefined|unformatted|unit|unknown|write|yes|zero|namelist)(?=\\()',
caseInsensitive: true,
comment: 'input/output instrinsics' },
{ token: 'keyword.operator.logical.fortran.modern',
regex: '\\b(?:\\=\\=|\\/\\=|\\>\\=|\\>|\\<|\\<\\=)\\b',
comment: 'logical operators in symbolic format' },
{ token: 'keyword.operator.fortran.modern',
regex: '\\%|\\=\\>',
comment: 'operators' },
{ token: 'keyword.other.instrinsic.numeric.fortran.modern',
regex: '\\b(?:ceiling|floor|modulo)(?=\\()',
caseInsensitive: true,
comment: 'numeric instrinsics' },
{ token: 'keyword.other.instrinsic.array.fortran.modern',
regex: '\\b(?:allocate|allocated|deallocate)(?=\\()',
caseInsensitive: true,
comment: 'matrix/vector/array instrinsics' },
{ token: 'keyword.other.instrinsic.pointer.fortran.modern',
regex: '\\bassociated(?=\\()',
caseInsensitive: true,
comment: 'pointer instrinsics' },
{ token: 'keyword.other.programming-units.fortran.modern',
regex: '\\b(?:end\\s*)?(?:interface|procedure|module)\\b',
caseInsensitive: true,
comment: 'programming units' },
{ token: 'storage.type.fortran.modern',
regex: '\\btype(?=\\s*\\()\\b(?=.*::)',
caseInsensitive: true,
push:
[ { token: 'meta.specification.fortran.modern',
regex: '(?=!)|$',
next: 'pop' },
{ include: '$base' },
{ defaultToken: 'meta.specification.fortran.modern' } ],
comment: 'Line of type specification' },
{ token: 'storage.type.fortran.modern',
regex: '\\btype(?=\\s*\\()\\b',
caseInsensitive: true },
{ token: 'storage.modifier.fortran.modern',
regex: '\\b(?:optional|recursive|pointer|allocatable|target|private|public)\\b',
caseInsensitive: true } ] }
this.normalizeRules();
};
FortranModernHighlightRules.metaData = { comment: 'Specificities of Fortran >= 90',
fileTypes: [ 'f90', 'F90', 'f95', 'F95', 'f03', 'F03', 'f08', 'F08' ],
firstLineMatch: '(?i)-[*]- mode: f90 -[*]-',
keyEquivalent: '^~F',
name: 'Fortran - Modern',
scopeName: 'source.fortran.modern' }
oop.inherits(FortranModernHighlightRules, TextHighlightRules);
exports.FortranModernHighlightRules = FortranModernHighlightRules;
});

View file

@ -1,64 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* Contributor(s):
*
*
*
* ***** END LICENSE BLOCK ***** */
/*
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
*/
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var HTMLTwigHighlightRules = require("./html_twig_highlight_rules").HTMLTwigHighlightRules;
// TODO: pick appropriate fold mode
var FoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
var highlighter = new HTMLTwigHighlightRules();
this.foldingRules = new FoldMode();
this.$tokenizer = new Tokenizer(highlighter.getRules());
};
oop.inherits(Mode, TextMode);
(function() {
this.lineCommentStart = "<%+#";
this.blockComment = {start: "/*", end: "*/"};
// Extra logic goes here.
}).call(Mode.prototype);
exports.Mode = Mode;
});

View file

@ -1,683 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
/* This file was autogenerated from https://raw.github.com/Anomareh/PHP-Twig.tmbundle/master/Syntaxes/HTML (Twig).tmLanguage (uuid: ) */
/****************************************************************************************
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
* fileTypes *
****************************************************************************************/
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var HTMLTwigHighlightRules = function() {
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
this.$rules = { start:
[ { token: [ 'punctuation.definition.tag.html', 'entity.name.tag.html' ],
regex: '(<)([a-zA-Z0-9:]+)(?=[^>]*></\\2>)',
push:
[ { token:
[ 'punctuation.definition.tag.html',
'meta.scope.between-tag-pair.html',
'punctuation.definition.tag.html',
'entity.name.tag.html',
'punctuation.definition.tag.html' ],
regex: '(>)(<)(/)([a-zA-Z0-9:]+)(>)',
next: 'pop' },
{ include: '#tag-stuff' },
{ defaultToken: 'meta.tag.any.html' } ] },
{ token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.xml.html' ],
regex: '(<\\?)(xml)',
push:
[ { token: 'punctuation.definition.tag.html',
regex: '\\?>',
next: 'pop' },
{ include: '#tag-generic-attribute' },
{ include: '#string-double-quoted' },
{ include: '#string-single-quoted' },
{ defaultToken: 'meta.tag.preprocessor.xml.html' } ] },
{ token: 'punctuation.definition.comment.html',
regex: '<!--',
push:
[ { token: 'punctuation.definition.comment.html',
regex: '--\\s*>',
next: 'pop' },
{ token: 'invalid.illegal.bad-comments-or-CDATA.html',
regex: '--' },
{ include: '#embedded-code' },
{ defaultToken: 'comment.block.html' } ] },
{ token: 'punctuation.definition.tag.html',
regex: '<!',
push:
[ { token: 'punctuation.definition.tag.html',
regex: '>',
next: 'pop' },
{ token: 'entity.name.tag.doctype.html',
regex: 'DOCTYPE',
push:
[ { token: [], regex: '(?=>)', next: 'pop' },
{ token: 'string.quoted.double.doctype.identifiers-and-DTDs.html',
regex: '"[^">]*"' },
{ defaultToken: 'meta.tag.sgml.doctype.html' } ] },
{ token: 'constant.other.inline-data.html',
regex: '\\[CDATA\\[',
push:
[ { token: 'constant.other.inline-data.html',
regex: ']](?=>)',
next: 'pop' },
{ defaultToken: 'constant.other.inline-data.html' } ] },
{ token: 'invalid.illegal.bad-comments-or-CDATA.html',
regex: '\\s*(?!--|>)\\S\\s*' },
{ defaultToken: 'meta.tag.sgml.html' } ] },
{ include: '#embedded-code' },
{ token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.style.html' ],
regex: '(?:^\\s+)?(<)(style)\\b(?![^>]*/>)',
caseInsensitive: true,
push:
[ { token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.style.html',
'punctuation.definition.tag.html' ],
regex: '(</)(style)(>)(?:\\s*$)?',
caseInsensitive: true,
next: 'pop' },
{ include: '#tag-stuff' },
{ token: 'punctuation.definition.tag.html',
regex: '>',
push:
[ { token: 'text',
regex: '(?=</style)',
caseInsensitive: true,
next: 'pop' },
{ include: '#embedded-code' },
{ include: 'source.css' } ] },
{ defaultToken: 'source.css.embedded.html' } ] },
{ token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.script.html' ],
regex: '(?:^\\s+)?(<)(script)\\b(?![^>]*/>)',
caseInsensitive: true,
push:
[ { token: 'punctuation.definition.tag.html',
regex: '(?<=</(?:script|SCRIPT))>(?:\\s*$)?',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?',
next: 'pop' },
{ include: '#tag-stuff' },
{ token: 'punctuation.definition.tag.html',
regex: '(?<!</(?:script|SCRIPT))>',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<!</(?:script|SCRIPT))(>)',
push:
[ { token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.script.html' ],
regex: '(</)(script)',
caseInsensitive: true,
next: 'pop' },
{ token:
[ 'punctuation.definition.comment.js',
'comment.line.double-slash.js',
'comment.line.double-slash.js' ],
regex: '(//)(.*?)((?=</script)|$)' },
{ token: 'punctuation.definition.comment.js',
regex: '/\\*',
push:
[ { token: 'punctuation.definition.comment.js',
regex: '\\*/|(?=</script)',
next: 'pop' },
{ defaultToken: 'comment.block.js' } ] },
{ include: '#php' },
{ include: 'source.js' } ] },
{ defaultToken: 'source.js.embedded.html' } ] },
{ token:
[ 'punctuation.definition.tag.html',
'entity.name.tag.structure.any.html' ],
regex: '(</?)((?:body|head|html)\\b)',
caseInsensitive: true,
push:
[ { token: 'punctuation.definition.tag.html',
regex: '>',
next: 'pop' },
{ include: '#tag-stuff' },
{ defaultToken: 'meta.tag.structure.any.html' } ] },
{ token:
[ 'punctuation.definition.tag.begin.html',
'entity.name.tag.block.any.html' ],
regex: '(</?)((?:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)',
caseInsensitive: true,
push:
[ { token: 'punctuation.definition.tag.end.html',
regex: '>',
next: 'pop' },
{ include: '#tag-stuff' },
{ defaultToken: 'meta.tag.block.any.html' } ] },
{ token:
[ 'punctuation.definition.tag.begin.html',
'entity.name.tag.inline.any.html' ],
regex: '(</?)((?:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)',
caseInsensitive: true,
push:
[ { token: 'punctuation.definition.tag.end.html',
regex: '(?: ?/)?>',
next: 'pop' },
{ include: '#tag-stuff' },
{ defaultToken: 'meta.tag.inline.any.html' } ] },
{ token:
[ 'punctuation.definition.tag.begin.html',
'entity.name.tag.other.html' ],
regex: '(</?)([a-zA-Z0-9:]+)',
push:
[ { token: 'punctuation.definition.tag.end.html',
regex: '>',
next: 'pop' },
{ include: '#tag-stuff' },
{ defaultToken: 'meta.tag.other.html' } ] },
{ include: '#entities' },
{ token: 'invalid.illegal.incomplete.html', regex: '<>' },
{ token: 'invalid.illegal.bad-angle-bracket.html', regex: '<' },
{ include: '#twig-variable-tags' },
{ include: '#twig-expression-tags' },
{ include: '#twig-comment-tags' } ],
'#embedded-code':
[ { include: '#ruby' },
{ include: '#php' },
{ include: '#twig-variable-tags' },
{ include: '#twig-expression-tags' },
{ include: '#twig-comment-tags' },
{ include: '#python' } ],
'#entities':
[ { token:
[ 'punctuation.definition.entity.html',
'constant.character.entity.html',
'punctuation.definition.entity.html' ],
regex: '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)' },
{ token: 'invalid.illegal.bad-ampersand.html', regex: '&' } ],
'#twig-variable-tags':
[ { token: 'punctuation.section.tag.twig',
regex: '\\{\\{-?',
push:
[ { token: 'punctuation.section.tag.twig',
regex: '-?\\}\\}',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-operators' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ defaultToken: 'meta.tag.template.value.twig' } ] } ],
'#twig-expression-tags':
[ { token: 'punctuation.section.tag.twig',
regex: '\\{%-?',
push:
[ { token: 'punctuation.section.tag.twig',
regex: '-?%\\}',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-keywords' },
{ include: '#twig-operators' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ defaultToken: 'meta.tag.template.block.twig' } ] } ],
'#twig-comment-tags':
[ { token: 'punctuation.definition.comment.begin.twig',
regex: '\\{#-?',
push:
[ { token: 'punctuation.definition.comment.end.twig',
regex: '-?#\\}',
next: 'pop' },
{ defaultToken: 'comment.block.twig' } ] } ],
'#twig-constants':
[ { token: 'constant.language.twig',
regex: '(?<=[\\s\\[\\(\\{:,])(?:true|false|null|none)(?=[\\s\\)\\]\\}\\,])',
caseInsensitive: true,
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?i)(?<=[\\s\\[\\(\\{:,])(?:true|false|null|none)(?=[\\s\\)\\]\\}\\,])' },
{ token: 'constant.numeric.twig',
regex: '(?<=[\\s\\[\\(\\{:,]|\\.\\.|\\*\\*)[0-9]+(?:\\.[0-9]+)?(?=[\\s\\)\\]\\}\\,]|\\.\\.|\\*\\*)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[\\s\\[\\(\\{:,]|\\.\\.|\\*\\*)[0-9]+(?:\\.[0-9]+)?(?=[\\s\\)\\]\\}\\,]|\\.\\.|\\*\\*)' } ],
'#twig-operators':
[ { token: 'keyword.operator.arithmetic.twig',
regex: '(?<=\\s)(?:\\+|-|\\*|/|%|//)(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)(\\+|-|\\*|/|%|//)(?=\\s)' },
{ token: 'keyword.operator.assignment.twig',
regex: '(?<=\\s)(?:=|~)(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)(=|~)(?=\\s)' },
{ token: 'keyword.operator.bitwise.twig',
regex: '(?<=\\s)(?:&|\\||\\^)(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)(&|\\||\\^)(?=\\s)' },
{ token: 'keyword.operator.comparison.twig',
regex: '(?<=\\s)(?:(?:!|=)=|<=?|>=?|i(?:s|n))(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)((?:!|=)=|<=?|>=?|i(?:s|n))(?=\\s)' },
{ token: 'keyword.operator.logical.twig',
regex: '(?<=\\s)(?:not|or|and|\\?|:)(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)(not|or|and|\\?|:)(?=\\s)' },
{ token: 'keyword.operator.arithmetic.twig',
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\'"])\\*\\*(?=[a-zA-Z0-9_\\x7f-\\xff\'"])',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\'"])\\*\\*(?=[a-zA-Z0-9_\\x{7f}-\\x{ff}\'"])' },
{ token: 'keyword.operator.other.twig',
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\'"])\\.\\.(?=[a-zA-Z0-9_\\x7f-\\xff\'"])',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\'"])\\.\\.(?=[a-zA-Z0-9_\\x{7f}-\\x{ff}\'"])' },
{ token: 'keyword.operator.other.twig',
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\}\\)\'"])\\|(?=[a-zA-Z_\\x7f-\\xff])',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\}\\)\'"])\\|(?=[a-zA-Z_\\x{7f}-\\x{ff}])' } ],
'#twig-objects':
[ { token: 'variable.other.twig',
regex: '(?<=[\\s\\{\\[\\(:,])[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*(?=[\\s\\}\\[\\]\\(\\)\\.\\|,:])',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[\\s\\{\\[\\(:,])([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?=[\\s\\}\\[\\]\\(\\)\\.\\|,:])' } ],
'#twig-properties':
[ { token:
[ 'punctuation.separator.property.twig',
'variable.other.property.twig' ],
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff])(\\.)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(?=[\\.\\s\\|\\[\\)\\]\\}:,])',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?=[\\.\\s\\|\\[\\)\\]\\}:,])\n ' },
{ token:
[ 'punctuation.separator.property.twig',
'variable.other.property.twig',
'punctuation.definition.parameters.begin.twig' ],
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff])(\\.)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\()',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (\\()\n ',
push:
[ { token: 'punctuation.definition.parameters.end.twig',
regex: '\\)',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ defaultToken: 'meta.function.arguments.twig' } ] },
{ token:
[ 'punctuation.section.array.begin.twig',
'variable.other.property.twig',
'punctuation.section.array.end.twig',
'punctuation.section.array.begin.twig',
'variable.other.property.twig',
'punctuation.section.array.end.twig',
'punctuation.section.array.begin.twig',
'variable.other.property.twig',
'punctuation.section.array.end.twig' ],
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]])(?:(\\[)(\'[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\')(\\])|(\\[)("[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*")(\\])|(\\[)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\]))',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]])\n (?:\n (\\[)(\'[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\')(\\])\n |(\\[)("[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*")(\\])\n |(\\[)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\])\n )\n ' } ],
'#twig-strings':
[ { token: 'punctuation.definition.string.begin.twig',
regex: '\'',
push:
[ { token: 'punctuation.definition.string.end.twig',
regex: '\'',
next: 'pop' },
{ defaultToken: 'string.quoted.single.twig' } ] },
{ token: 'punctuation.definition.string.begin.twig',
regex: '"',
push:
[ { token: 'punctuation.definition.string.end.twig',
regex: '"',
next: 'pop' },
{ defaultToken: 'string.quoted.double.twig' } ] } ],
'#twig-arrays':
[ { token: 'punctuation.section.array.begin.twig',
regex: '(?<=[\\s\\(\\{\\[:,])\\[',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[\\s\\(\\{\\[:,])\\[',
push:
[ { token: 'punctuation.section.array.end.twig',
regex: '\\]',
next: 'pop' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ include: '#twig-constants' },
{ include: '#twig-strings' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ token: 'punctuation.separator.object.twig', regex: ',' },
{ defaultToken: 'meta.array.twig' } ] } ],
'#twig-hashes':
[ { token: 'punctuation.section.hash.begin.twig',
regex: '(?<=[\\s\\(\\{\\[:,])\\{',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[\\s\\(\\{\\[:,])\\{',
push:
[ { token: 'punctuation.section.hash.end.twig',
regex: '\\}',
next: 'pop' },
{ include: '#twig-hashes' },
{ include: '#twig-arrays' },
{ include: '#twig-constants' },
{ include: '#twig-strings' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ token: 'punctuation.separator.key-value.twig', regex: ':' },
{ token: 'punctuation.separator.object.twig', regex: ',' },
{ defaultToken: 'meta.hash.twig' } ] } ],
'#twig-keywords':
[ { token: 'keyword.control.twig',
regex: '(?<=\\s)(?:(?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\s)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=\\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\s)' } ],
'#twig-functions-warg':
[ { token:
[ 'support.function.twig',
'punctuation.definition.parameters.begin.twig' ],
regex: '(?<=[\\s\\(\\[\\{:,])(attribute|block|constant|cycle|date|divisibleby|dump|parent|random|range|sameas|template_from_string)(\\()',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=[\\s\\(\\[\\{:,])(attribute|block|constant|cycle|date|divisibleby|dump|parent|random|range|sameas|template_from_string)(\\()',
push:
[ { token: 'punctuation.definition.parameters.end.twig',
regex: '\\)',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ defaultToken: 'meta.function.arguments.twig' } ] } ],
'#twig-functions':
[ { token: 'support.function.twig',
regex: '(?<=is\\s)(?:defined|empty|even|iterable|none|null|odd)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=is\\s)(defined|empty|even|iterable|none|null|odd)' } ],
'#twig-macros':
[ { token:
[ 'meta.function-call.twig',
'punctuation.separator.property.twig',
'variable.other.property.twig',
'punctuation.definition.parameters.begin.twig' ],
regex: '(?<=[\\s\\(\\[\\{:,])([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\.)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\()',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?x)\n (?<=[\\s\\(\\[\\{:,])\n ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?:\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n )\n (\\()\n ',
push:
[ { token: 'punctuation.definition.parameters.end.twig',
regex: '\\)',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ defaultToken: 'meta.function.arguments.twig' } ] } ],
'#twig-filters-warg':
[ { token:
[ 'support.function.twig',
'punctuation.definition.parameters.begin.twig' ],
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\\\'\\"]\\||\\{%\\sfilter\\s)(convert_encoding|date|date_modify|default|e|escape|format|join|merge|number_format|replace|slice|split|trim)(\\()',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\\'\\"]\\|)|\\{%\\sfilter\\s)(convert_encoding|date|date_modify|default|e|escape|format|join|merge|number_format|replace|slice|split|trim)(\\()',
push:
[ { token: 'punctuation.definition.parameters.end.twig',
regex: '\\)',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ defaultToken: 'meta.function.arguments.twig' } ] } ],
'#twig-filters':
[ { token: 'support.function.twig',
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\\\'\\"]\\||\\{%\\sfilter\\s)(?:abs|capitalize|e(?:scape)?|join|(?:json|url)_encode|keys|length|lower|nl2br|number_format|raw|reverse|sort|striptags|title|trim|upper)(?=[\\s\\|\\]\\}\\):,]|\\.\\.|\\*\\*)',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\\'\\"]\\|)|\\{%\\sfilter\\s)(abs|capitalize|e(?:scape)?|join|(?:json|url)_encode|keys|length|lower|nl2br|number_format|raw|reverse|sort|striptags|title|trim|upper)(?=[\\s\\|\\]\\}\\):,]|\\.\\.|\\*\\*)' } ],
'#twig-filters-warg-ud':
[ { token:
[ 'meta.function-call.other.twig',
'punctuation.definition.parameters.begin.twig' ],
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\\\'\\"]\\||\\{%\\sfilter\\s)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\()',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\\'\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\()',
push:
[ { token: 'punctuation.definition.parameters.end.twig',
regex: '\\)',
next: 'pop' },
{ include: '#twig-constants' },
{ include: '#twig-functions-warg' },
{ include: '#twig-functions' },
{ include: '#twig-macros' },
{ include: '#twig-objects' },
{ include: '#twig-properties' },
{ include: '#twig-filters-warg' },
{ include: '#twig-filters' },
{ include: '#twig-filters-warg-ud' },
{ include: '#twig-filters-ud' },
{ include: '#twig-strings' },
{ include: '#twig-arrays' },
{ include: '#twig-hashes' },
{ defaultToken: 'meta.function.arguments.twig' } ] } ],
'#twig-filters-ud':
[ { token: 'meta.function-call.other.twig',
regex: '(?<=[a-zA-Z0-9_\\x7f-\\xff\\]\\)\\\'\\"]\\||\\{%\\sfilter\\s)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*',
TODO: 'FIXME: regexp doesn\'t have js equivalent',
originalRegex: '(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\\'\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)' } ],
'#php':
[ { token: 'text',
regex: '(?=(?:^\\s*)?<\\?)',
push:
[ { token: 'text', regex: '(?!(?:^\\s*)?<\\?)', next: 'pop' },
{ include: 'source.php' } ] } ],
'#python':
[ { token: 'source.python.embedded.html',
regex: '^\\s*<\\?python(?!.*\\?>)',
push:
[ { token: 'source.python.embedded.html',
regex: '\\?>(?:\\s*$)?',
next: 'pop' },
{ include: 'source.python' },
{ defaultToken: 'source.python.embedded.html' } ] } ],
'#ruby':
[ { token: 'punctuation.definition.comment.erb',
regex: '<%+#',
push:
[ { token: 'punctuation.definition.comment.erb',
regex: '%>',
next: 'pop' },
{ defaultToken: 'comment.block.erb' } ] },
{ token: 'punctuation.section.embedded.ruby',
regex: '<%+(?!>)=?',
push:
[ { token: 'punctuation.section.embedded.ruby',
regex: '-?%>',
next: 'pop' },
{ token:
[ 'punctuation.definition.comment.ruby',
'comment.line.number-sign.ruby' ],
regex: '(#)(.*?)(?=-?%>)' },
{ include: 'source.ruby' },
{ defaultToken: 'source.ruby.embedded.html' } ] },
{ token: 'punctuation.section.embedded.ruby.nitro',
regex: '<\\?r(?!>)=?',
push:
[ { token: 'punctuation.section.embedded.ruby.nitro',
regex: '-?\\?>',
next: 'pop' },
{ token:
[ 'punctuation.definition.comment.ruby.nitro',
'comment.line.number-sign.ruby.nitro' ],
regex: '(#)(.*?)(?=-?\\?>)' },
{ include: 'source.ruby' },
{ defaultToken: 'source.ruby.nitro.embedded.html' } ] } ],
'#string-double-quoted':
[ { token: 'punctuation.definition.string.begin.html',
regex: '"',
push:
[ { token: 'punctuation.definition.string.end.html',
regex: '"',
next: 'pop' },
{ include: '#embedded-code' },
{ include: '#entities' },
{ defaultToken: 'string.quoted.double.html' } ] } ],
'#string-single-quoted':
[ { token: 'punctuation.definition.string.begin.html',
regex: '\'',
push:
[ { token: 'punctuation.definition.string.end.html',
regex: '\'',
next: 'pop' },
{ include: '#embedded-code' },
{ include: '#entities' },
{ defaultToken: 'string.quoted.single.html' } ] } ],
'#tag-generic-attribute':
[ { token: 'entity.other.attribute-name.html',
regex: '\\b[a-zA-Z\\-:]+' } ],
'#tag-id-attribute':
[ { token:
[ 'entity.other.attribute-name.id.html',
'meta.attribute-with-value.id.html',
'punctuation.separator.key-value.html' ],
regex: '\\b(id)\\b(\\s*)(=)',
push:
[{ token: 'punctuation.definition.string.begin.html',
regex: '"',
push:
[ { token: 'punctuation.definition.string.end.html',
regex: '"',
next: 'pop' },
{ include: '#embedded-code' },
{ include: '#entities' },
{ defaultToken: 'string.quoted.double.html' } ] },
{ token: 'punctuation.definition.string.begin.html',
regex: '\'',
push:
[ { token: 'punctuation.definition.string.end.html',
regex: '\'',
next: 'pop' },
{ include: '#embedded-code' },
{ include: '#entities' },
{ defaultToken: 'string.quoted.single.html' } ] },
{ defaultToken: 'meta.attribute-with-value.id.html' },
{ token: '', regex: '', next: 'pop' } ] } ],
'#tag-stuff':
[ { include: '#tag-id-attribute' },
{ include: '#tag-generic-attribute' },
{ include: '#string-double-quoted' },
{ include: '#string-single-quoted' },
{ include: '#embedded-code' } ] }
this.normalizeRules();
};
HTMLTwigHighlightRules.metaData = { fileTypes: [ 'twig', 'html.twig' ],
firstLineMatch: '<!DOCTYPE|<(?i:html)|<\\?(?i:php)|\\{\\{|\\{%|\\{#',
foldingStartMarker: '(?x)\n (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\\b.*?>\n |<!--(?!.*--\\s*>)\n |^<!--\\ \\#tminclude\\ (?>.*?-->)$\n |\\{%\\s+(if|for|spaceless|raw|autoescape|macro|)\n )',
foldingStopMarker: '(?x)\n (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)>\n |^(?!.*?<!--).*?--\\s*>\n |^<!--\\ end\\ tminclude\\ -->$\n |\\{%\\s+end(if|for|spaceless|raw|autoescape|macro|)\n )',
keyEquivalent: '^~T',
name: 'HTML (Twig)',
scopeName: 'text.html.twig' }
oop.inherits(HTMLTwigHighlightRules, TextHighlightRules);
exports.HTMLTwigHighlightRules = HTMLTwigHighlightRules;
});