/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; export var conf = { wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] }, brackets: [ ['{', '}'], ['[', ']'], ['(', ')'] ], autoClosingPairs: [ { open: '{', close: '}', notIn: ['string'] }, { open: '[', close: ']', notIn: ['string'] }, { open: '(', close: ')', notIn: ['string'] }, { open: '"', close: '"', notIn: ['string'] }, { open: '\'', close: '\'', notIn: ['string', 'comment'] } ], folding: { markers: { start: new RegExp("^\\s*(#|\/\/)region\\b"), end: new RegExp("^\\s*(#|\/\/)endregion\\b") } } }; export var language = { defaultToken: '', tokenPostfix: '', // ignoreCase: true, // The main tokenizer for our languages tokenizer: { root: [ [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.root' }], [/)/, ['delimiter.html', 'tag.html', 'delimiter.html']], [/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]], [/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]], [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], [/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], [/]+/, 'metatag.content.html'], [/>/, 'metatag.html', '@pop'], ], comment: [ [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }], [/-->/, 'comment.html', '@pop'], [/[^-]+/, 'comment.content.html'], [/./, 'comment.content.html'] ], otherTag: [ [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.otherTag' }], [/\/?>/, 'delimiter.html', '@pop'], [/"([^"]*)"/, 'attribute.value'], [/'([^']*)'/, 'attribute.value'], [/[\w\-]+/, 'attribute.name'], [/=/, 'delimiter'], [/[ \t\r\n]+/], ], // -- BEGIN