More tweaks for optimal colorization

This commit is contained in:
Alex Dima 2017-01-02 01:42:29 +02:00
parent da418eb8d9
commit 6882a78485
13 changed files with 176 additions and 188 deletions

View file

@ -138,7 +138,8 @@ export var language = <IMonarchLanguage> {
comment: [ comment: [
['\\*\\/', 'comment', '@pop'], ['\\*\\/', 'comment', '@pop'],
[/[^*/]+/, 'comment'] [/[^*/]+/, 'comment'],
[/./, 'comment'],
], ],
name: [ name: [

View file

@ -57,8 +57,8 @@ export var conf:IRichLanguageConfiguration = {
} }
export const htmlTokenTypes = { export const htmlTokenTypes = {
DELIM_START: 'start.delimiter.tag.html', DELIM_START: 'delimiter.html',
DELIM_END: 'end.delimiter.tag.html', DELIM_END: 'delimiter.html',
DELIM_COMMENT: 'comment.html', DELIM_COMMENT: 'comment.html',
COMMENT: 'comment.content.html', COMMENT: 'comment.content.html',
getTag: (name: string) => { getTag: (name: string) => {

View file

@ -56,8 +56,8 @@ export var conf:IRichLanguageConfiguration = {
}; };
export const htmlTokenTypes = { export const htmlTokenTypes = {
DELIM_START: 'start.delimiter.tag', DELIM_START: 'delimiter',
DELIM_END: 'end.delimiter.tag', DELIM_END: 'delimiter',
DELIM_COMMENT: 'comment', DELIM_COMMENT: 'comment',
getTag: (name: string) => { getTag: (name: string) => {
return 'tag'; return 'tag';

View file

@ -17,14 +17,12 @@ const TOKEN_LIST = 'keyword';
const TOKEN_BLOCK = 'string'; const TOKEN_BLOCK = 'string';
const TOKEN_BLOCK_CODE = 'variable.source'; const TOKEN_BLOCK_CODE = 'variable.source';
const DELIM_ASSIGN = 'meta.tag.assign.html'; const DELIM_ASSIGN = 'delimiter.html';
const ATTRIB_NAME = 'attribute.name.html'; const ATTRIB_NAME = 'attribute.name.html';
const ATTRIB_VALUE = 'string.html'; const ATTRIB_VALUE = 'string.html';
const TAG_PREFIX = 'entity.name.tag.tag-';
function getTag(name: string) { function getTag(name: string) {
return TAG_PREFIX + name; return 'tag';
} }
export var conf: IRichLanguageConfiguration = { export var conf: IRichLanguageConfiguration = {

View file

@ -32,8 +32,8 @@ export var conf:IRichLanguageConfiguration = {
}; };
export const htmlTokenTypes = { export const htmlTokenTypes = {
DELIM_START: 'start.delimiter.tag.html', DELIM_START: 'delimiter.html',
DELIM_END: 'end.delimiter.tag.html', DELIM_END: 'delimiter.html',
DELIM_COMMENT: 'comment.html', DELIM_COMMENT: 'comment.html',
COMMENT: 'comment.content.html', COMMENT: 'comment.content.html',
getTag: (name: string) => { getTag: (name: string) => {

View file

@ -56,8 +56,8 @@ export var conf:IRichLanguageConfiguration = {
}; };
export const htmlTokenTypes = { export const htmlTokenTypes = {
DELIM_START: 'start.delimiter.tag.html', DELIM_START: 'delimiter.html',
DELIM_END: 'end.delimiter.tag.html', DELIM_END: 'delimiter.html',
DELIM_COMMENT: 'comment.html', DELIM_COMMENT: 'comment.html',
COMMENT: 'comment.content.html', COMMENT: 'comment.content.html',
getTag: (name: string) => { getTag: (name: string) => {

View file

@ -1095,13 +1095,13 @@ export var language = <ILanguage> {
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number'] [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
], ],
strings: [ strings: [
[/N'/, { token: 'string.quote', next: '@string' }], [/N'/, { token: 'string', next: '@string' }],
[/'/, { token: 'string.quote', next: '@string' }] [/'/, { token: 'string', next: '@string' }]
], ],
string: [ string: [
[/[^']+/, 'string'], [/[^']+/, 'string'],
[/''/, 'string'], [/''/, 'string'],
[/'/, { token: 'string.quote', next: '@pop' }] [/'/, { token: 'string', next: '@pop' }]
], ],
complexIdentifiers: [ complexIdentifiers: [
[/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }], [/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],

View file

@ -44,25 +44,25 @@ export var language = <ILanguage> {
// Standard opening tag // Standard opening tag
[/(<)(@qualifiedName)/, [ [/(<)(@qualifiedName)/, [
{ token: 'delimiter.start' }, { token: 'delimiter' },
{ token: 'tag.tag-$2', next: '@tag.$2' }]], { token: 'tag', next: '@tag' }]],
// Standard closing tag // Standard closing tag
[/(<\/)(@qualifiedName)(\s*)(>)/, [ [/(<\/)(@qualifiedName)(\s*)(>)/, [
{ token: 'delimiter.end' }, { token: 'delimiter' },
{ token: 'tag.tag-$2' }, { token: 'tag' },
'', '',
{ token: 'delimiter.end' }]], { token: 'delimiter' }]],
// Meta tags - instruction // Meta tags - instruction
[/(<\?)(@qualifiedName)/, [ [/(<\?)(@qualifiedName)/, [
{ token: 'delimiter.start' }, { token: 'delimiter' },
{ token: 'metatag.instruction', next: '@tag' }]], { token: 'metatag', next: '@tag' }]],
// Meta tags - declaration // Meta tags - declaration
[/(<\!)(@qualifiedName)/, [ [/(<\!)(@qualifiedName)/, [
{ token: 'delimiter.start' }, { token: 'delimiter' },
{ token: 'metatag.declaration', next: '@tag' }]], { token: 'metatag', next: '@tag' }]],
// CDATA // CDATA
[/<\!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }], [/<\!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }],
@ -82,11 +82,11 @@ export var language = <ILanguage> {
[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/, ['attribute.name', '', 'attribute.value']], [/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/, ['attribute.name', '', 'attribute.value']],
[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ['attribute.name', '', 'attribute.value']], [/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ['attribute.name', '', 'attribute.value']],
[/@qualifiedName/, 'attribute.name'], [/@qualifiedName/, 'attribute.name'],
[/\?>/, { token: 'delimiter.start', next: '@pop' }], [/\?>/, { token: 'delimiter', next: '@pop' }],
[/(\/)(>)/, [ [/(\/)(>)/, [
{ token: 'tag.tag-$S2' }, { token: 'tag' },
{ token: 'delimiter.start', next: '@pop' }]], { token: 'delimiter', next: '@pop' }]],
[/>/, { token: 'delimiter.start', next: '@pop' }], [/>/, { token: 'delimiter', next: '@pop' }],
], ],
whitespace: [ whitespace: [

View file

@ -245,7 +245,7 @@ testTokenization(['handlebars', 'css'], [
{ startIndex:7, type: HTML_DELIM_START }, { startIndex:7, type: HTML_DELIM_START },
{ startIndex:8, type: getTag('script') }, { startIndex:8, type: getTag('script') },
{ startIndex:14, type: HTML_DELIM_END }, { startIndex:14, type: HTML_DELIM_END },
{ startIndex:15, type: HTML_DELIM_START }, // { startIndex:15, type: HTML_DELIM_START },
{ startIndex:17, type: getTag('script') }, { startIndex:17, type: getTag('script') },
{ startIndex:23, type: HTML_DELIM_END }, { startIndex:23, type: HTML_DELIM_END },
{ startIndex:24, type: handlebarsTokenTypes.EMBED }, { startIndex:24, type: handlebarsTokenTypes.EMBED },

View file

@ -274,7 +274,7 @@ testTokenization(['html', 'css'], [
{ startIndex:9, type: DELIM_START }, { startIndex:9, type: DELIM_START },
{ startIndex:11, type: getTag('script') }, { startIndex:11, type: getTag('script') },
{ startIndex:17, type: DELIM_END }, { startIndex:17, type: DELIM_END },
{ startIndex:18, type: DELIM_START }, // { startIndex:18, type: DELIM_START },
{ startIndex:19, type: getTag('script') }, { startIndex:19, type: getTag('script') },
{ startIndex:25, type: DELIM_END }, { startIndex:25, type: DELIM_END },
{ startIndex:26, type: '' }, { startIndex:26, type: '' },
@ -295,7 +295,7 @@ testTokenization(['html', 'css'], [
{ startIndex:12, type: DELIM_ASSIGN }, { startIndex:12, type: DELIM_ASSIGN },
{ startIndex:13, type: ATTRIB_VALUE }, { startIndex:13, type: ATTRIB_VALUE },
{ startIndex:30, type: DELIM_END }, { startIndex:30, type: DELIM_END },
{ startIndex:31, type: DELIM_START }, // { startIndex:31, type: DELIM_START },
{ startIndex:33, type: getTag('script') }, { startIndex:33, type: getTag('script') },
{ startIndex:39, type: DELIM_END } { startIndex:39, type: DELIM_END }
] ]
@ -330,7 +330,7 @@ testTokenization(['html', 'css'], [
{ startIndex:34, type: DELIM_ASSIGN }, { startIndex:34, type: DELIM_ASSIGN },
{ startIndex:35, type: ATTRIB_VALUE }, { startIndex:35, type: ATTRIB_VALUE },
{ startIndex:44, type: DELIM_END }, { startIndex:44, type: DELIM_END },
{ startIndex:45, type: DELIM_START }, // { startIndex:45, type: DELIM_START },
{ startIndex:47, type: getTag('script') }, { startIndex:47, type: getTag('script') },
{ startIndex:53, type: DELIM_END } { startIndex:53, type: DELIM_END }
] ]

View file

@ -1707,7 +1707,7 @@ testTokenization(['php', 'css'], [
{ startIndex:0, type: htmlTokenTypes.DELIM_START }, { startIndex:0, type: htmlTokenTypes.DELIM_START },
{ startIndex:1, type: htmlTokenTypes.getTag('abc') }, { startIndex:1, type: htmlTokenTypes.getTag('abc') },
{ startIndex:4, type: htmlTokenTypes.DELIM_END }, { startIndex:4, type: htmlTokenTypes.DELIM_END },
{ startIndex:5, type: htmlTokenTypes.DELIM_START }, // { startIndex:5, type: htmlTokenTypes.DELIM_START },
{ startIndex:6, type: htmlTokenTypes.getTag('script') }, { startIndex:6, type: htmlTokenTypes.getTag('script') },
{ startIndex:12, type: htmlTokenTypes.DELIM_END }, { startIndex:12, type: htmlTokenTypes.DELIM_END },
{ startIndex:13, type: '' }, { startIndex:13, type: '' },
@ -1731,7 +1731,7 @@ testTokenization(['php', 'css'], [
{ startIndex:0, type: htmlTokenTypes.DELIM_START }, { startIndex:0, type: htmlTokenTypes.DELIM_START },
{ startIndex:1, type: htmlTokenTypes.getTag('abc') }, { startIndex:1, type: htmlTokenTypes.getTag('abc') },
{ startIndex:4, type: htmlTokenTypes.DELIM_END }, { startIndex:4, type: htmlTokenTypes.DELIM_END },
{ startIndex:5, type: htmlTokenTypes.DELIM_START }, // { startIndex:5, type: htmlTokenTypes.DELIM_START },
{ startIndex:6, type: htmlTokenTypes.getTag('script') }, { startIndex:6, type: htmlTokenTypes.getTag('script') },
{ startIndex:12, type: htmlTokenTypes.DELIM_END }, { startIndex:12, type: htmlTokenTypes.DELIM_END },
{ startIndex:13, type: '' }, { startIndex:13, type: '' },
@ -1787,7 +1787,7 @@ testTokenization(['php', 'css'], [
{ startIndex:0, type: htmlTokenTypes.DELIM_START }, { startIndex:0, type: htmlTokenTypes.DELIM_START },
{ startIndex:1, type: htmlTokenTypes.getTag('html') }, { startIndex:1, type: htmlTokenTypes.getTag('html') },
{ startIndex:5, type: htmlTokenTypes.DELIM_END }, { startIndex:5, type: htmlTokenTypes.DELIM_END },
{ startIndex:6, type: htmlTokenTypes.DELIM_START }, // { startIndex:6, type: htmlTokenTypes.DELIM_START },
{ startIndex:7, type: htmlTokenTypes.getTag('style') }, { startIndex:7, type: htmlTokenTypes.getTag('style') },
{ startIndex:12, type: htmlTokenTypes.DELIM_END }, { startIndex:12, type: htmlTokenTypes.DELIM_END },
{ startIndex:13, type: 'metatag.php' }, { startIndex:13, type: 'metatag.php' },
@ -1821,7 +1821,7 @@ testTokenization(['php', 'css'], [
{ startIndex:137, type: htmlTokenTypes.DELIM_START }, { startIndex:137, type: htmlTokenTypes.DELIM_START },
{ startIndex:139, type: htmlTokenTypes.getTag('script') }, { startIndex:139, type: htmlTokenTypes.getTag('script') },
{ startIndex:145, type: htmlTokenTypes.DELIM_END }, { startIndex:145, type: htmlTokenTypes.DELIM_END },
{ startIndex:146, type: htmlTokenTypes.DELIM_START }, // { startIndex:146, type: htmlTokenTypes.DELIM_START },
{ startIndex:148, type: htmlTokenTypes.getTag('html') }, { startIndex:148, type: htmlTokenTypes.getTag('html') },
{ startIndex:152, type: htmlTokenTypes.DELIM_END }, { startIndex:152, type: htmlTokenTypes.DELIM_END },
{ startIndex:153, type: 'metatag.php' }, { startIndex:153, type: 'metatag.php' },

View file

@ -421,49 +421,38 @@ testTokenization('sql', [
{ startIndex: 7, type: 'white.sql' }, { startIndex: 7, type: 'white.sql' },
{ startIndex: 8, type: 'identifier.sql' }, { startIndex: 8, type: 'identifier.sql' },
{ startIndex: 10, type: 'operator.sql' }, { startIndex: 10, type: 'operator.sql' },
{ startIndex: 11, type: 'string.quote.sql' }, { startIndex: 11, type: 'string.sql' },
{ startIndex: 12, type: 'string.sql' },
{ startIndex: 20, type: 'string.quote.sql' },
{ startIndex: 21, type: 'delimiter.sql' } { startIndex: 21, type: 'delimiter.sql' }
]}], ]}],
[{ [{
line: '\'a \'\' string with quotes\'', line: '\'a \'\' string with quotes\'',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.quote.sql' }, { startIndex: 0, type: 'string.sql' },
{ startIndex: 1, type: 'string.sql' },
{ startIndex: 24, type: 'string.quote.sql' }
]}], ]}],
[{ [{
line: '\'a " string with quotes\'', line: '\'a " string with quotes\'',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.quote.sql' }, { startIndex: 0, type: 'string.sql' },
{ startIndex: 1, type: 'string.sql' },
{ startIndex: 23, type: 'string.quote.sql' }
]}], ]}],
[{ [{
line: '\'a -- string with comment\'', line: '\'a -- string with comment\'',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.quote.sql' }, { startIndex: 0, type: 'string.sql' },
{ startIndex: 1, type: 'string.sql' },
{ startIndex: 25, type: 'string.quote.sql' }
]}], ]}],
[{ [{
line: 'N\'a unicode string\'', line: 'N\'a unicode string\'',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.quote.sql' }, { startIndex: 0, type: 'string.sql' },
{ startIndex: 2, type: 'string.sql' },
{ startIndex: 18, type: 'string.quote.sql' }
]}], ]}],
[{ [{
line: '\'a endless string', line: '\'a endless string',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.quote.sql' }, { startIndex: 0, type: 'string.sql' },
{ startIndex: 1, type: 'string.sql' }
]}], ]}],
// Operators // Operators

View file

@ -12,36 +12,36 @@ testTokenization('xml', [
[{ [{
line: '<person>', line: '<person>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-person.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 7, type: 'delimiter.start.xml' } { startIndex: 7, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<person/>', line: '<person/>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-person.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 8, type: 'delimiter.start.xml' } { startIndex: 8, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<person >', line: '<person >',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-person.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 7, type: '' }, { startIndex: 7, type: '' },
{ startIndex: 8, type: 'delimiter.start.xml' } { startIndex: 8, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<person />', line: '<person />',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-person.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 7, type: '' }, { startIndex: 7, type: '' },
{ startIndex: 8, type: 'tag.tag-person.xml' }, { startIndex: 8, type: 'tag.xml' },
{ startIndex: 9, type: 'delimiter.start.xml' } { startIndex: 9, type: 'delimiter.xml' }
]}], ]}],
// Incomplete Start Tag // Incomplete Start Tag
@ -54,15 +54,15 @@ testTokenization('xml', [
[{ [{
line: '<person', line: '<person',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-person.xml' } { startIndex: 1, type: 'tag.xml' }
]}], ]}],
[{ [{
line: '<input', line: '<input',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-input.xml' } { startIndex: 1, type: 'tag.xml' }
]}], ]}],
// Invalid Open Start Tag // Invalid Open Start Tag
@ -82,8 +82,8 @@ testTokenization('xml', [
line: 'i <person;', line: 'i <person;',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'delimiter.start.xml' }, { startIndex: 2, type: 'delimiter.xml' },
{ startIndex: 3, type: 'tag.tag-person.xml' }, { startIndex: 3, type: 'tag.xml' },
{ startIndex: 9, type: '' } { startIndex: 9, type: '' }
]}], ]}],
@ -91,45 +91,45 @@ testTokenization('xml', [
[{ [{
line: '<tool name="">', line: '<tool name="">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.value.xml' }, { startIndex: 11, type: 'attribute.value.xml' },
{ startIndex: 13, type: 'delimiter.start.xml' } { startIndex: 13, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<tool name="Monaco">', line: '<tool name="Monaco">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.value.xml' }, { startIndex: 11, type: 'attribute.value.xml' },
{ startIndex: 19, type: 'delimiter.start.xml' } { startIndex: 19, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<tool name=\'Monaco\'>', line: '<tool name=\'Monaco\'>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.value.xml' }, { startIndex: 11, type: 'attribute.value.xml' },
{ startIndex: 19, type: 'delimiter.start.xml' } { startIndex: 19, type: 'delimiter.xml' }
]}], ]}],
// Tag with Attributes // Tag with Attributes
[{ [{
line: '<tool name="Monaco" version="1.0">', line: '<tool name="Monaco" version="1.0">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
@ -138,101 +138,101 @@ testTokenization('xml', [
{ startIndex: 20, type: 'attribute.name.xml' }, { startIndex: 20, type: 'attribute.name.xml' },
{ startIndex: 27, type: '' }, { startIndex: 27, type: '' },
{ startIndex: 28, type: 'attribute.value.xml' }, { startIndex: 28, type: 'attribute.value.xml' },
{ startIndex: 33, type: 'delimiter.start.xml' } { startIndex: 33, type: 'delimiter.xml' }
]}], ]}],
// Tag with Name-Only-Attribute // Tag with Name-Only-Attribute
[{ [{
line: '<tool name>', line: '<tool name>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: 'delimiter.start.xml' } { startIndex: 10, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<tool name version>', line: '<tool name version>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.name.xml' }, { startIndex: 11, type: 'attribute.name.xml' },
{ startIndex: 18, type: 'delimiter.start.xml' } { startIndex: 18, type: 'delimiter.xml' }
]}], ]}],
// Tag with Attribute And Whitespace // Tag with Attribute And Whitespace
[{ [{
line: '<tool name= "monaco">', line: '<tool name= "monaco">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 13, type: 'attribute.value.xml' }, { startIndex: 13, type: 'attribute.value.xml' },
{ startIndex: 21, type: 'delimiter.start.xml' } { startIndex: 21, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<tool name = "monaco">', line: '<tool name = "monaco">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 13, type: 'attribute.value.xml' }, { startIndex: 13, type: 'attribute.value.xml' },
{ startIndex: 21, type: 'delimiter.start.xml' } { startIndex: 21, type: 'delimiter.xml' }
]}], ]}],
// Tag with Invalid Attribute Name // Tag with Invalid Attribute Name
[{ [{
line: '<tool name!@#="bar">', line: '<tool name!@#="bar">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 15, type: 'attribute.name.xml' }, { startIndex: 15, type: 'attribute.name.xml' },
{ startIndex: 18, type: '' }, { startIndex: 18, type: '' },
{ startIndex: 19, type: 'delimiter.start.xml' } { startIndex: 19, type: 'delimiter.xml' }
]}], ]}],
// Tag with Invalid Attribute Value // Tag with Invalid Attribute Value
[{ [{
line: '<tool name=">', line: '<tool name=">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tool.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.value.xml' }, { startIndex: 11, type: 'attribute.value.xml' },
{ startIndex: 12, type: 'delimiter.start.xml' } { startIndex: 12, type: 'delimiter.xml' }
]}], ]}],
// Complete End Tag // Complete End Tag
[{ [{
line: '</person>', line: '</person>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.end.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-person.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 8, type: 'delimiter.end.xml' } { startIndex: 8, type: 'delimiter.xml' }
]}], ]}],
// Complete End Tag with Whitespace // Complete End Tag with Whitespace
[{ [{
line: '</person >', line: '</person >',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.end.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-person.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
{ startIndex: 10, type: 'delimiter.end.xml' } { startIndex: 10, type: 'delimiter.xml' }
]}], ]}],
// Incomplete End Tag // Incomplete End Tag
@ -279,23 +279,23 @@ testTokenization('xml', [
[{ [{
line: '<tools><![CDATA[<person/>]]></tools>', line: '<tools><![CDATA[<person/>]]></tools>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tools.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 6, type: 'delimiter.start.xml' }, { startIndex: 6, type: 'delimiter.xml' },
{ startIndex: 7, type: 'delimiter.cdata.xml' }, { startIndex: 7, type: 'delimiter.cdata.xml' },
{ startIndex: 16, type: '' }, { startIndex: 16, type: '' },
{ startIndex: 25, type: 'delimiter.cdata.xml' }, { startIndex: 25, type: 'delimiter.cdata.xml' },
{ startIndex: 28, type: 'delimiter.end.xml' }, { startIndex: 28, type: 'delimiter.xml' },
{ startIndex: 30, type: 'tag.tag-tools.xml' }, { startIndex: 30, type: 'tag.xml' },
{ startIndex: 35, type: 'delimiter.end.xml' } { startIndex: 35, type: 'delimiter.xml' }
]}], ]}],
[{ [{
line: '<tools>', line: '<tools>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-tools.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 6, type: 'delimiter.start.xml' } { startIndex: 6, type: 'delimiter.xml' }
]},{ ]},{
line: '\t<![CDATA[', line: '\t<![CDATA[',
tokens: [ tokens: [
@ -313,45 +313,45 @@ testTokenization('xml', [
]},{ ]},{
line: '</tools>', line: '</tools>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.end.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-tools.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 7, type: 'delimiter.end.xml' } { startIndex: 7, type: 'delimiter.xml' }
]}], ]}],
// Generated from sample // Generated from sample
[{ [{
line: '<?xml version="1.0"?>', line: '<?xml version="1.0"?>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 2, type: 'metatag.instruction.xml' }, { startIndex: 2, type: 'metatag.xml' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },
{ startIndex: 6, type: 'attribute.name.xml' }, { startIndex: 6, type: 'attribute.name.xml' },
{ startIndex: 13, type: '' }, { startIndex: 13, type: '' },
{ startIndex: 14, type: 'attribute.value.xml' }, { startIndex: 14, type: 'attribute.value.xml' },
{ startIndex: 19, type: 'delimiter.start.xml' } { startIndex: 19, type: 'delimiter.xml' }
]}, { ]}, {
line: '<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">', line: '<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.start.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 1, type: 'tag.tag-configuration.xml' }, { startIndex: 1, type: 'tag.xml' },
{ startIndex: 14, type: '' }, { startIndex: 14, type: '' },
{ startIndex: 15, type: 'attribute.name.xml' }, { startIndex: 15, type: 'attribute.name.xml' },
{ startIndex: 24, type: '' }, { startIndex: 24, type: '' },
{ startIndex: 25, type: 'attribute.value.xml' }, { startIndex: 25, type: 'attribute.value.xml' },
{ startIndex: 78, type: 'delimiter.start.xml' } { startIndex: 78, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <connectionStrings>', line: ' <connectionStrings>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'delimiter.start.xml' }, { startIndex: 2, type: 'delimiter.xml' },
{ startIndex: 3, type: 'tag.tag-connectionstrings.xml' }, { startIndex: 3, type: 'tag.xml' },
{ startIndex: 20, type: 'delimiter.start.xml' } { startIndex: 20, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <add name="MyDB" ', line: ' <add name="MyDB" ',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 4, type: 'delimiter.start.xml' }, { startIndex: 4, type: 'delimiter.xml' },
{ startIndex: 5, type: 'tag.tag-add.xml' }, { startIndex: 5, type: 'tag.xml' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
{ startIndex: 9, type: 'attribute.name.xml' }, { startIndex: 9, type: 'attribute.name.xml' },
{ startIndex: 13, type: '' }, { startIndex: 13, type: '' },
@ -376,28 +376,28 @@ testTokenization('xml', [
{ startIndex: 36, type: 'attribute.name.xml' }, { startIndex: 36, type: 'attribute.name.xml' },
{ startIndex: 47, type: '' }, { startIndex: 47, type: '' },
{ startIndex: 48, type: 'attribute.value.xml' }, { startIndex: 48, type: 'attribute.value.xml' },
{ startIndex: 61, type: 'tag.tag-add.xml' }, { startIndex: 61, type: 'tag.xml' },
{ startIndex: 62, type: 'delimiter.start.xml' } { startIndex: 62, type: 'delimiter.xml' }
]}, { ]}, {
line: ' </connectionStrings>', line: ' </connectionStrings>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'delimiter.end.xml' }, { startIndex: 2, type: 'delimiter.xml' },
{ startIndex: 4, type: 'tag.tag-connectionstrings.xml' }, { startIndex: 4, type: 'tag.xml' },
{ startIndex: 21, type: 'delimiter.end.xml' } { startIndex: 21, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <system.web>', line: ' <system.web>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'delimiter.start.xml' }, { startIndex: 2, type: 'delimiter.xml' },
{ startIndex: 3, type: 'tag.tag-system.web.xml' }, { startIndex: 3, type: 'tag.xml' },
{ startIndex: 13, type: 'delimiter.start.xml' } { startIndex: 13, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <customErrors defaultRedirect="GenericError.htm"', line: ' <customErrors defaultRedirect="GenericError.htm"',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 4, type: 'delimiter.start.xml' }, { startIndex: 4, type: 'delimiter.xml' },
{ startIndex: 5, type: 'tag.tag-customerrors.xml' }, { startIndex: 5, type: 'tag.xml' },
{ startIndex: 17, type: '' }, { startIndex: 17, type: '' },
{ startIndex: 18, type: 'attribute.name.xml' }, { startIndex: 18, type: 'attribute.name.xml' },
{ startIndex: 33, type: '' }, { startIndex: 33, type: '' },
@ -413,13 +413,13 @@ testTokenization('xml', [
{ startIndex: 24, type: 'attribute.name.xml' }, { startIndex: 24, type: 'attribute.name.xml' },
{ startIndex: 37, type: '' }, { startIndex: 37, type: '' },
{ startIndex: 38, type: 'attribute.value.xml' }, { startIndex: 38, type: 'attribute.value.xml' },
{ startIndex: 47, type: 'delimiter.start.xml' } { startIndex: 47, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <error statusCode="500" redirect="InternalError.htm"/>', line: ' <error statusCode="500" redirect="InternalError.htm"/>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 6, type: 'delimiter.start.xml' }, { startIndex: 6, type: 'delimiter.xml' },
{ startIndex: 7, type: 'tag.tag-error.xml' }, { startIndex: 7, type: 'tag.xml' },
{ startIndex: 12, type: '' }, { startIndex: 12, type: '' },
{ startIndex: 13, type: 'attribute.name.xml' }, { startIndex: 13, type: 'attribute.name.xml' },
{ startIndex: 23, type: '' }, { startIndex: 23, type: '' },
@ -428,22 +428,22 @@ testTokenization('xml', [
{ startIndex: 30, type: 'attribute.name.xml' }, { startIndex: 30, type: 'attribute.name.xml' },
{ startIndex: 38, type: '' }, { startIndex: 38, type: '' },
{ startIndex: 39, type: 'attribute.value.xml' }, { startIndex: 39, type: 'attribute.value.xml' },
{ startIndex: 58, type: 'tag.tag-error.xml' }, { startIndex: 58, type: 'tag.xml' },
{ startIndex: 59, type: 'delimiter.start.xml' } { startIndex: 59, type: 'delimiter.xml' }
]}, { ]}, {
line: ' </customErrors>', line: ' </customErrors>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 4, type: 'delimiter.end.xml' }, { startIndex: 4, type: 'delimiter.xml' },
{ startIndex: 6, type: 'tag.tag-customerrors.xml' }, { startIndex: 6, type: 'tag.xml' },
{ startIndex: 18, type: 'delimiter.end.xml' } { startIndex: 18, type: 'delimiter.xml' }
]}, { ]}, {
line: ' </system.web>', line: ' </system.web>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'delimiter.end.xml' }, { startIndex: 2, type: 'delimiter.xml' },
{ startIndex: 4, type: 'tag.tag-system.web.xml' }, { startIndex: 4, type: 'tag.xml' },
{ startIndex: 14, type: 'delimiter.end.xml' } { startIndex: 14, type: 'delimiter.xml' }
]}, { ]}, {
line: ' ', line: ' ',
tokens: [ tokens: [
@ -474,100 +474,100 @@ testTokenization('xml', [
line: ' <!DOCTYPE another meta tag>', line: ' <!DOCTYPE another meta tag>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 3, type: 'metatag.declaration.xml' }, { startIndex: 3, type: 'metatag.xml' },
{ startIndex: 10, type: '' }, { startIndex: 10, type: '' },
{ startIndex: 11, type: 'attribute.name.xml' }, { startIndex: 11, type: 'attribute.name.xml' },
{ startIndex: 18, type: '' }, { startIndex: 18, type: '' },
{ startIndex: 19, type: 'attribute.name.xml' }, { startIndex: 19, type: 'attribute.name.xml' },
{ startIndex: 23, type: '' }, { startIndex: 23, type: '' },
{ startIndex: 24, type: 'attribute.name.xml' }, { startIndex: 24, type: 'attribute.name.xml' },
{ startIndex: 27, type: 'delimiter.start.xml' } { startIndex: 27, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <tools><![CDATA[Some text and tags <person/>]]></tools>', line: ' <tools><![CDATA[Some text and tags <person/>]]></tools>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-tools.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 7, type: 'delimiter.start.xml' }, { startIndex: 7, type: 'delimiter.xml' },
{ startIndex: 8, type: 'delimiter.cdata.xml' }, { startIndex: 8, type: 'delimiter.cdata.xml' },
{ startIndex: 17, type: '' }, { startIndex: 17, type: '' },
{ startIndex: 45, type: 'delimiter.cdata.xml' }, { startIndex: 45, type: 'delimiter.cdata.xml' },
{ startIndex: 48, type: 'delimiter.end.xml' }, { startIndex: 48, type: 'delimiter.xml' },
{ startIndex: 50, type: 'tag.tag-tools.xml' }, { startIndex: 50, type: 'tag.xml' },
{ startIndex: 55, type: 'delimiter.end.xml' } { startIndex: 55, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <aSelfClosingTag with="attribute" />', line: ' <aSelfClosingTag with="attribute" />',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-aselfclosingtag.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 17, type: '' }, { startIndex: 17, type: '' },
{ startIndex: 18, type: 'attribute.name.xml' }, { startIndex: 18, type: 'attribute.name.xml' },
{ startIndex: 22, type: '' }, { startIndex: 22, type: '' },
{ startIndex: 23, type: 'attribute.value.xml' }, { startIndex: 23, type: 'attribute.value.xml' },
{ startIndex: 34, type: '' }, { startIndex: 34, type: '' },
{ startIndex: 35, type: 'tag.tag-aselfclosingtag.xml' }, { startIndex: 35, type: 'tag.xml' },
{ startIndex: 36, type: 'delimiter.start.xml' } { startIndex: 36, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <aSelfClosingTag with="attribute"/>', line: ' <aSelfClosingTag with="attribute"/>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-aselfclosingtag.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 17, type: '' }, { startIndex: 17, type: '' },
{ startIndex: 18, type: 'attribute.name.xml' }, { startIndex: 18, type: 'attribute.name.xml' },
{ startIndex: 22, type: '' }, { startIndex: 22, type: '' },
{ startIndex: 23, type: 'attribute.value.xml' }, { startIndex: 23, type: 'attribute.value.xml' },
{ startIndex: 34, type: 'tag.tag-aselfclosingtag.xml' }, { startIndex: 34, type: 'tag.xml' },
{ startIndex: 35, type: 'delimiter.start.xml' } { startIndex: 35, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <namespace:aSelfClosingTag otherspace:with="attribute"/>', line: ' <namespace:aSelfClosingTag otherspace:with="attribute"/>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-namespace:aselfclosingtag.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 27, type: '' }, { startIndex: 27, type: '' },
{ startIndex: 28, type: 'attribute.name.xml' }, { startIndex: 28, type: 'attribute.name.xml' },
{ startIndex: 43, type: '' }, { startIndex: 43, type: '' },
{ startIndex: 44, type: 'attribute.value.xml' }, { startIndex: 44, type: 'attribute.value.xml' },
{ startIndex: 55, type: 'tag.tag-namespace:aselfclosingtag.xml' }, { startIndex: 55, type: 'tag.xml' },
{ startIndex: 56, type: 'delimiter.start.xml' } { startIndex: 56, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <valid-name also_valid this.one=\'too is valid\'/>', line: ' <valid-name also_valid this.one=\'too is valid\'/>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-valid-name.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 12, type: '' }, { startIndex: 12, type: '' },
{ startIndex: 13, type: 'attribute.name.xml' }, { startIndex: 13, type: 'attribute.name.xml' },
{ startIndex: 23, type: '' }, { startIndex: 23, type: '' },
{ startIndex: 24, type: 'attribute.name.xml' }, { startIndex: 24, type: 'attribute.name.xml' },
{ startIndex: 32, type: '' }, { startIndex: 32, type: '' },
{ startIndex: 33, type: 'attribute.value.xml' }, { startIndex: 33, type: 'attribute.value.xml' },
{ startIndex: 47, type: 'tag.tag-valid-name.xml' }, { startIndex: 47, type: 'tag.xml' },
{ startIndex: 48, type: 'delimiter.start.xml' } { startIndex: 48, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <aSimpleSelfClosingTag />', line: ' <aSimpleSelfClosingTag />',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-asimpleselfclosingtag.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 23, type: '' }, { startIndex: 23, type: '' },
{ startIndex: 24, type: 'tag.tag-asimpleselfclosingtag.xml' }, { startIndex: 24, type: 'tag.xml' },
{ startIndex: 25, type: 'delimiter.start.xml' } { startIndex: 25, type: 'delimiter.xml' }
]}, { ]}, {
line: ' <aSimpleSelfClosingTag/>', line: ' <aSimpleSelfClosingTag/>',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.start.xml' }, { startIndex: 1, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-asimpleselfclosingtag.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 24, type: 'delimiter.start.xml' } { startIndex: 24, type: 'delimiter.xml' }
]}, { ]}, {
line: '</configuration>', line: '</configuration>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.end.xml' }, { startIndex: 0, type: 'delimiter.xml' },
{ startIndex: 2, type: 'tag.tag-configuration.xml' }, { startIndex: 2, type: 'tag.xml' },
{ startIndex: 15, type: 'delimiter.end.xml' } { startIndex: 15, type: 'delimiter.xml' }
]}] ]}]
]); ]);