From a5298a8158fa4d7c4a2b0b6eba144abeb5015d7c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Sep 2016 19:15:23 +0200 Subject: [PATCH] Remove PHP (moved to monaco-languages) --- .../modes/supports/tokenizationSupport.ts | 42 +- src/vs/editor/editor.main.ts | 1 - src/vs/languages/buildfile.js | 3 - .../languages/php/common/php.contribution.ts | 17 - src/vs/languages/php/common/php.ts | 540 ----- src/vs/languages/php/test/common/php.test.ts | 1938 ----------------- 6 files changed, 9 insertions(+), 2532 deletions(-) delete mode 100644 src/vs/languages/php/common/php.contribution.ts delete mode 100644 src/vs/languages/php/common/php.ts delete mode 100644 src/vs/languages/php/test/common/php.test.ts diff --git a/src/vs/editor/common/modes/supports/tokenizationSupport.ts b/src/vs/editor/common/modes/supports/tokenizationSupport.ts index 0fc381a9466..54b3951d1a8 100644 --- a/src/vs/editor/common/modes/supports/tokenizationSupport.ts +++ b/src/vs/editor/common/modes/supports/tokenizationSupport.ts @@ -41,19 +41,10 @@ export interface ITokenizationCustomization { getNestedMode?: (state:modes.IState, locator:IModeLocator) => modes.IMode; - getNestedModeInitialState?: (myState:modes.IState) => modes.IState; - /** * Return null if the line does not leave the nested mode */ getLeavingNestedModeData?: (line:string, state:modes.IState) => ILeavingNestedModeData; - - /** - * Callback for when leaving a nested mode and returning to the outer mode. - * @param myStateAfterNestedMode The outer mode's state that will begin to tokenize - * @param lastNestedModeState The nested mode's last state - */ - onReturningFromNestedMode?: (myStateAfterNestedMode:modes.IState, lastNestedModeState:modes.IState)=> void; } function isFunction(something) { @@ -68,9 +59,7 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa private defaults: { enterNestedMode: boolean; getNestedMode: boolean; - getNestedModeInitialState: boolean; getLeavingNestedModeData: boolean; - onReturningFromNestedMode: boolean; }; private supportsNestedModes:boolean; @@ -88,9 +77,7 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa this.defaults = { enterNestedMode: !isFunction(customization.enterNestedMode), getNestedMode: !isFunction(customization.getNestedMode), - getNestedModeInitialState: !isFunction(customization.getNestedModeInitialState), getLeavingNestedModeData: !isFunction(customization.getLeavingNestedModeData), - onReturningFromNestedMode: !isFunction(customization.onReturningFromNestedMode) }; this._embeddedModes = Object.create(null); @@ -183,7 +170,6 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa let bufferAfterNestedMode = leavingNestedModeData.bufferAfterNestedMode; let myStateAfterNestedMode = leavingNestedModeData.stateAfterNestedMode; myStateAfterNestedMode.setStateData(myStateBeforeNestedMode.getStateData()); - this._onReturningFromNestedMode(myStateAfterNestedMode, nestedModeState); return this._myTokenize(bufferAfterNestedMode, myStateAfterNestedMode, deltaOffset + nestedModeBuffer.length, stopAtOffset, prependTokens, prependModeTransitions); } @@ -306,20 +292,17 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa } private _getNestedModeInitialState(state:modes.IState): modes.IState { - if (this.defaults.getNestedModeInitialState) { - let nestedMode = this._getNestedMode(state); - if (nestedMode) { - let tokenizationSupport = modes.TokenizationRegistry.get(nestedMode.getId()); - if (tokenizationSupport) { - let nestedModeState = tokenizationSupport.getInitialState(); - nestedModeState.setStateData(state); - return nestedModeState; - } + let nestedMode = this._getNestedMode(state); + if (nestedMode) { + let tokenizationSupport = modes.TokenizationRegistry.get(nestedMode.getId()); + if (tokenizationSupport) { + let nestedModeState = tokenizationSupport.getInitialState(); + nestedModeState.setStateData(state); + return nestedModeState; } - - return new NullState(nestedMode ? nestedMode.getId() : NULL_MODE_ID, state); } - return this.customization.getNestedModeInitialState(state); + + return new NullState(nestedMode ? nestedMode.getId() : NULL_MODE_ID, state); } private _getLeavingNestedModeData(line:string, state:modes.IState): ILeavingNestedModeData { @@ -328,11 +311,4 @@ export class TokenizationSupport implements modes.ITokenizationSupport, IDisposa } return this.customization.getLeavingNestedModeData(line, state); } - - private _onReturningFromNestedMode(myStateAfterNestedMode:modes.IState, lastNestedModeState:modes.IState): void { - if (this.defaults.onReturningFromNestedMode) { - return null; - } - return this.customization.onReturningFromNestedMode(myStateAfterNestedMode, lastNestedModeState); - } } diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 58ba3c11289..f3b3b409711 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -9,7 +9,6 @@ import 'vs/editor/browser/editor.all'; import 'vs/editor/contrib/quickOpen/browser/quickOutline'; import 'vs/editor/contrib/quickOpen/browser/gotoLine'; import 'vs/editor/contrib/quickOpen/browser/quickCommand'; -import 'vs/languages/php/common/php.contribution'; import 'vs/languages/html/common/html.contribution'; import 'vs/languages/handlebars/common/handlebars.contribution'; import 'vs/languages/razor/common/razor.contribution'; diff --git a/src/vs/languages/buildfile.js b/src/vs/languages/buildfile.js index 9f5decb9e94..5b0e1d91c59 100644 --- a/src/vs/languages/buildfile.js +++ b/src/vs/languages/buildfile.js @@ -49,9 +49,6 @@ exports.collectModules = function(args) { .combine(worker) .define('vs/languages/html/common/htmlWorker', ['vs/languages/lib/common/beautify-html']); - // ---- php ----------------------------------- - common.define('vs/languages/php/common/php'); - // ---- razor ----------------------------------- common.define('vs/languages/razor/common/razor', ['vs/languages/html/common/html']) .combine(worker) diff --git a/src/vs/languages/php/common/php.contribution.ts b/src/vs/languages/php/common/php.contribution.ts deleted file mode 100644 index dae38bf46f7..00000000000 --- a/src/vs/languages/php/common/php.contribution.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import {ModesRegistry} from 'vs/editor/common/modes/modesRegistry'; - -ModesRegistry.registerCompatMode({ - id: 'php', - extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'], - aliases: ['PHP', 'php'], - mimetypes: ['application/x-php'], - moduleId: 'vs/languages/php/common/php', - ctorName: 'PHPMode', - deps: ['text/html'] -}); diff --git a/src/vs/languages/php/common/php.ts b/src/vs/languages/php/common/php.ts deleted file mode 100644 index 5eb776bcd04..00000000000 --- a/src/vs/languages/php/common/php.ts +++ /dev/null @@ -1,540 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import objects = require('vs/base/common/objects'); -import Modes = require('vs/editor/common/modes'); -import {CompatMode, isDigit, createWordRegExp} from 'vs/editor/common/modes/abstractMode'; -import {AbstractState} from 'vs/editor/common/modes/abstractState'; -import {IModeService} from 'vs/editor/common/services/modeService'; -import {LanguageConfigurationRegistry, LanguageConfiguration} from 'vs/editor/common/modes/languageConfigurationRegistry'; -import {TokenizationSupport, ILeavingNestedModeData, ITokenizationCustomization} from 'vs/editor/common/modes/supports/tokenizationSupport'; -import {TextualSuggestSupport} from 'vs/editor/common/modes/supports/suggestSupport'; -import {IEditorWorkerService} from 'vs/editor/common/services/editorWorkerService'; -import {IConfigurationService} from 'vs/platform/configuration/common/configuration'; -import {ICompatWorkerService} from 'vs/editor/common/services/compatWorkerService'; - - -var brackets = (function() { - - let bracketsSource = [ - { tokenType:'delimiter.bracket.php', open: '{', close: '}' }, - { tokenType:'delimiter.array.php', open: '[', close: ']' }, - { tokenType:'delimiter.parenthesis.php', open: '(', close: ')' } - ]; - - let MAP: { - [text:string]:{ - tokenType: string; - } - } = Object.create(null); - - for (let i = 0; i < bracketsSource.length; i++) { - let bracket = bracketsSource[i]; - MAP[bracket.open] = { - tokenType: bracket.tokenType - }; - MAP[bracket.close] = { - tokenType: bracket.tokenType - }; - } - - return { - stringIsBracket: (text:string): boolean => { - return !!MAP[text]; - }, - tokenTypeFromString: (text:string): string => { - return MAP[text].tokenType; - } - }; -})(); - -var delimiters = '+-*%&|^~!=<>(){}[]/?;:.,@'; -var separators = '+-*/%&|^~!=<>(){}[]"\'\\/?;:.,#'; - -var whitespace = '\t '; - -var isKeyword = objects.createKeywordMatcher([ - 'abstract', 'and', 'array', 'as', 'break', - 'callable', 'case', 'catch', 'cfunction', 'class', 'clone', - 'const', 'continue', 'declare', 'default', 'do', - 'else', 'elseif', 'enddeclare', 'endfor', 'endforeach', - 'endif', 'endswitch', 'endwhile', 'extends', 'false', 'final', - 'for', 'foreach', 'function', 'global', 'goto', - 'if', 'implements', 'interface', 'instanceof', 'insteadof', - 'namespace', 'new', 'null', 'object', 'old_function', 'or', 'private', - 'protected', 'public', 'resource', 'static', 'switch', 'throw', 'trait', - 'try', 'true', 'use', 'var', 'while', 'xor', - 'die', 'echo', 'empty', 'exit', 'eval', - 'include', 'include_once', 'isset', 'list', 'require', - 'require_once', 'return', 'print', 'unset', 'yield', - '__construct' -]); - -var isCompileTimeConstant = objects.createKeywordMatcher([ - '__CLASS__', - '__DIR__', - '__FILE__', - '__LINE__', - '__NAMESPACE__', - '__METHOD__', - '__FUNCTION__', - '__TRAIT__' -]); - -var isPreDefinedVariable = objects.createKeywordMatcher([ - '$GLOBALS', - '$_SERVER', - '$_GET', - '$_POST', - '$_FILES', - '$_REQUEST', - '$_SESSION', - '$_ENV', - '$_COOKIE', - '$php_errormsg', - '$HTTP_RAW_POST_DATA', - '$http_response_header', - '$argc', - '$argv' -]); - -var isDelimiter = (character:string) => { - return delimiters.indexOf(character) > -1; -}; - -var isVariable = (character:string) => { - return (character[0] === '$'); -}; - -export abstract class PHPState extends AbstractState { - - private name:string; - private whitespaceTokenType:string; - public parent:Modes.IState; - - constructor(modeId:string, name:string, parent:Modes.IState, whitespaceTokenType:string='') { - super(modeId); - this.name = name; - this.parent = parent; - this.whitespaceTokenType = whitespaceTokenType; - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPState) { - return ( - super.equals(other) && - this.name === other.name && - this.whitespaceTokenType === other.whitespaceTokenType && - AbstractState.safeEquals(this.parent, other.parent) - ); - } - return false; - } - - public tokenize(stream:Modes.IStream):Modes.ITokenizationResult { - stream.setTokenRules(separators, whitespace); - if (stream.skipWhitespace().length > 0) { - return { type: this.whitespaceTokenType }; - } - return this.stateTokenize(stream); - } - - public stateTokenize(stream:Modes.IStream):Modes.ITokenizationResult { - throw new Error('To be implemented'); - } - -} - -export class PHPString extends PHPState { - - private delimiter:string; - private isAtBeginning:boolean; - - constructor(modeId:string, parent:Modes.IState, delimiter:string, isAtBeginning:boolean=true) { - super(modeId, 'string', parent, 'string.php'); - this.delimiter = delimiter; - this.isAtBeginning = isAtBeginning; - } - - public makeClone():AbstractState { - return new PHPString(this.getModeId(), AbstractState.safeClone(this.parent), this.delimiter, this.isAtBeginning); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPString) { - return ( - super.equals(other) && - this.delimiter === other.delimiter && - this.isAtBeginning === other.isAtBeginning - ); - } - return false; - } - - public tokenize(stream:Modes.IStream):Modes.ITokenizationResult { - var readChars = this.isAtBeginning ? 1 : 0; - this.isAtBeginning = false; - while (!stream.eos()) { - var c = stream.next(); - if (c === '\\') { - if (readChars === 0) { - if (stream.eos()) { - return { type: 'string.php', nextState: this.parent }; - } else { - stream.next(); - } - } else { - stream.goBack(1); - return { type: 'string.php' }; - } - - } else if (c === this.delimiter) { - return { type: 'string.php' , nextState: this.parent }; - } - readChars += 1; - } - return { type: 'string.php' }; - } -} - -export class PHPNumber extends PHPState { - - private firstDigit:string; - - constructor(modeId:string, parent:Modes.IState, firstDigit:string) { - super(modeId, 'number', parent); - this.firstDigit = firstDigit; - } - - public makeClone():AbstractState { - return new PHPNumber(this.getModeId(), AbstractState.safeClone(this.parent), this.firstDigit); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPNumber) { - return ( - super.equals(other) && - this.firstDigit === other.firstDigit - ); - } - return false; - } - - public tokenize(stream:Modes.IStream):Modes.ITokenizationResult { - var character = this.firstDigit; - var base = 10, isDecimal = false, isExponent = false; - if (character === '0' && !stream.eos()) { - character = stream.peek(); - if (character.toLowerCase() === 'x') { base = 16; } - else if (character.toLowerCase() === 'b') { base = 2; } - else if (character === '.') { base = 10; } - else if (isDigit(character, 8)) { base = 8; } - else { - return { type: 'number.php', nextState: this.parent }; - } - stream.next(); - } - while (!stream.eos()) { - character = stream.peek(); - if (isDigit(character,base)) { - stream.next(); - } else if (base === 10) { - if (character === '.' && !isExponent && !isDecimal) { - isDecimal = true; - stream.next(); - } else if (character === 'e' && !isExponent) { - isExponent = true; - stream.next(); - if (!stream.eos() && stream.peek() === '-') { - stream.next(); - } - } else { - break; - } - } else if (base === 8 && isDigit(character,10)) { - base = 10; - stream.next(); - } else { - break; - } - } - var tokenType = 'number'; - if (base === 16) { - tokenType += '.hex'; - } else if (base === 8) { - tokenType += '.octal'; - } else if (base === 2) { - tokenType += '.binary'; - } - return { type: tokenType + '.php', nextState: this.parent }; - } -} - -export class PHPLineComment extends PHPState { - - constructor(modeId:string, parent:Modes.IState) { - super(modeId, 'comment', parent, 'comment.php'); - } - - public makeClone():AbstractState { - return new PHPDocComment(this.getModeId(), AbstractState.safeClone(this.parent)); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPLineComment) { - return ( - super.equals(other) - ); - } - return false; - } - - public tokenize(stream:Modes.IStream):Modes.ITokenizationResult { - while (!stream.eos()) { - var token = stream.next(); - if (token === '?' && !stream.eos() && stream.peek() === '>') { - stream.goBack(1); - return { type: 'comment.php', nextState: this.parent}; - } - } - return { type: 'comment.php', nextState: this.parent }; - } -} - -export class PHPDocComment extends PHPState { - - constructor(modeId:string, parent:Modes.IState) { - super(modeId, 'comment', parent, 'comment.php'); - } - - public makeClone():AbstractState { - return new PHPDocComment(this.getModeId(), AbstractState.safeClone(this.parent)); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPDocComment) { - return ( - super.equals(other) - ); - } - return false; - } - - public tokenize(stream:Modes.IStream):Modes.ITokenizationResult { - while (!stream.eos()) { - var token = stream.next(); - if (token === '*' && !stream.eos() && !stream.peekWhitespace() && stream.peek() === '/') { - stream.next(); - return { type: 'comment.php', nextState: this.parent}; - } - } - return { type: 'comment.php' }; - } -} - -export class PHPStatement extends PHPState { - - constructor(modeId:string, parent:Modes.IState) { - super(modeId, 'expression', parent); - } - - public makeClone():AbstractState { - return new PHPStatement(this.getModeId(), AbstractState.safeClone(this.parent)); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPStatement) { - return ( - super.equals(other) - ); - } - return false; - } - - public stateTokenize(stream:Modes.IStream):Modes.ITokenizationResult { - if (isDigit(stream.peek(), 10)) { - return { nextState: new PHPNumber(this.getModeId(), this, stream.next()) }; - } - if (stream.advanceIfString('?>').length) { - return { type: 'metatag.php', nextState: this.parent }; - } - - var token = stream.nextToken(); - if (isKeyword(token.toString().toLowerCase())) { - return { type: 'keyword.php' }; - } else if (isCompileTimeConstant(token)) { - return { type: 'constant.php' }; - } else if (isPreDefinedVariable(token)) { - return { type: 'variable.predefined.php' }; - } else if (isVariable(token)) { - return { type: 'variable.php' }; - } else if (token === '/') { - if (!stream.eos() && !stream.peekWhitespace()) { - switch(stream.peekToken()) { - case '/': - return { nextState: new PHPLineComment(this.getModeId(), this) }; - case '*': - stream.nextToken(); - return { nextState: new PHPDocComment(this.getModeId(), this) }; - } - } - } else if (token === '#') { - return { nextState: new PHPLineComment(this.getModeId(), this) }; - } else if (token === '"' || token === '\'') { - return { nextState: new PHPString(this.getModeId(), this, token) }; - } else if (brackets.stringIsBracket(token)) { - return { - type: brackets.tokenTypeFromString(token) - }; - } else if (isDelimiter(token)) { - return { type: 'delimiter.php' }; - } - return { type: '' }; - } -} - -export class PHPPlain extends PHPState { - - constructor(modeId:string, parent:Modes.IState) { - super(modeId, 'plain', parent); - } - - public makeClone():AbstractState { - return new PHPPlain(this.getModeId(), AbstractState.safeClone(this.parent)); - } - - public equals(other:Modes.IState):boolean { - if (other instanceof PHPPlain) { - return ( - super.equals(other) - ); - } - return false; - } - - public stateTokenize(stream:Modes.IStream):Modes.ITokenizationResult { - if (stream.advanceIfStringCaseInsensitive('myState).parent; - (myState).parent = null; - return result; - } - - public getLeavingNestedModeData(line:string, state:Modes.IState): ILeavingNestedModeData { - // Leave HTML if myStateAfterNestedMode).parent = lastNestedModeState; - } -} diff --git a/src/vs/languages/php/test/common/php.test.ts b/src/vs/languages/php/test/common/php.test.ts deleted file mode 100644 index f346625ed78..00000000000 --- a/src/vs/languages/php/test/common/php.test.ts +++ /dev/null @@ -1,1938 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Modes = require('vs/editor/common/modes'); -import modesUtil = require('vs/editor/test/common/modesUtil'); -import {HTMLMode, htmlTokenTypes} from 'vs/languages/html/common/html'; -import {MockModeService} from 'vs/editor/test/common/mocks/mockModeService'; -import {PHPMode} from 'vs/languages/php/common/php'; -import {MockTokenizingMode} from 'vs/editor/test/common/mocks/mockMode'; -import {LanguageConfigurationRegistry} from 'vs/editor/common/modes/languageConfigurationRegistry'; - -class PHPMockModeService extends MockModeService { - - private _htmlMode: HTMLMode; - - constructor() { - super(); - this._htmlMode = null; - } - - setHTMLMode(htmlMode: HTMLMode) { - this._htmlMode = htmlMode; - } - - isRegisteredMode(mimetypeOrModeId: string): boolean { - if (mimetypeOrModeId === 'text/html') { - return true; - } - if (mimetypeOrModeId === 'text/javascript') { - return true; - } - if (mimetypeOrModeId === 'text/css') { - return true; - } - throw new Error('Not implemented'); - } - - getModeId(mimetypeOrModeId: string): string { - if (mimetypeOrModeId === 'text/html') { - return 'html-mode-id'; - } - if (mimetypeOrModeId === 'text/javascript') { - return 'js-mode-id'; - } - if (mimetypeOrModeId === 'text/css') { - return 'css-mode-id'; - } - throw new Error('Not implemented'); - } - - getMode(commaSeparatedMimetypesOrCommaSeparatedIds: string): Modes.IMode { - if (commaSeparatedMimetypesOrCommaSeparatedIds === 'html-mode-id' || commaSeparatedMimetypesOrCommaSeparatedIds === 'text/html') { - return this._htmlMode; - } - if (commaSeparatedMimetypesOrCommaSeparatedIds === 'js-mode-id') { - return new MockTokenizingMode('mock-js'); - } - if (commaSeparatedMimetypesOrCommaSeparatedIds === 'css-mode-id') { - return new MockTokenizingMode('mock-css'); - } - throw new Error('Not implemented: ' + commaSeparatedMimetypesOrCommaSeparatedIds); - } -} - -suite('Syntax Highlighting - PHP', () => { - - let wordDefinition:RegExp; - let assertWords = modesUtil.assertWords; - let tokenizationSupport: Modes.ITokenizationSupport; - let assertOnEnter: modesUtil.IOnEnterAsserter; - - suiteSetup(function() { - let modeService = new PHPMockModeService(); - - modeService.setHTMLMode(new HTMLMode( - { id: 'html' }, - null, - modeService, - null, - null, - null - )); - - let mode = new PHPMode( - { id: 'php' }, - modeService, - null, - null, - null - ); - - tokenizationSupport = Modes.TokenizationRegistry.get(mode.getId()); - assertOnEnter = modesUtil.createOnEnterAsserter(PHPMode.LANG_CONFIG); - wordDefinition = LanguageConfigurationRegistry.getWordDefinition(mode.getId()); - }); - - test('', () => { - modesUtil.executeTests(tokenizationSupport, [ - - // Bug 13596:[ErrorTelemetry] Stream did not advance while tokenizing. Mode id is php (stuck) - // We're testing the fact that tokenize does not throw - [ - { line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'comment.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - // Variables - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'delimiter.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'number.php' }, - { startIndex:14, type: 'delimiter.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'string.php' }, - { startIndex:18, type: 'delimiter.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'delimiter.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'delimiter.php' }, - { startIndex:16, type: 'number.php' }, - { startIndex:18, type: 'delimiter.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'delimiter.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'number.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'delimiter.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'delimiter.parenthesis.php' }, - { startIndex:20, type: 'number.php' }, - { startIndex:22, type: '' }, - { startIndex:23, type: 'delimiter.php' }, - { startIndex:24, type: '' }, - { startIndex:25, type: 'number.php' }, - { startIndex:26, type: 'delimiter.parenthesis.php' }, - { startIndex:27, type: 'delimiter.php' }, - { startIndex:28, type: '' }, - { startIndex:29, type: 'metatag.php' } - ]}], - - // Keywords - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:21, type: 'delimiter.parenthesis.php' }, - { startIndex:23, type: '' }, - { startIndex:24, type: 'delimiter.bracket.php' }, - { startIndex:25, type: '' }, - { startIndex:26, type: 'delimiter.bracket.php' }, - { startIndex:27, type: '' }, - { startIndex:28, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: ' 52) { $start = 0; } ?>', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.parenthesis.php' }, - { startIndex:10, type: 'variable.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'delimiter.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'number.php' }, - { startIndex:21, type: 'delimiter.parenthesis.php' }, - { startIndex:22, type: '' }, - { startIndex:23, type: 'delimiter.bracket.php' }, - { startIndex:24, type: '' }, - { startIndex:25, type: 'variable.php' }, - { startIndex:31, type: '' }, - { startIndex:32, type: 'delimiter.php' }, - { startIndex:33, type: '' }, - { startIndex:34, type: 'number.php' }, - { startIndex:35, type: 'delimiter.php' }, - { startIndex:36, type: '' }, - { startIndex:37, type: 'delimiter.bracket.php' }, - { startIndex:38, type: '' }, - { startIndex:39, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.parenthesis.php' }, - { startIndex:10, type: 'keyword.php' }, - { startIndex:14, type: 'delimiter.parenthesis.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'delimiter.bracket.php' }, - { startIndex:17, type: '' }, - { startIndex:18, type: 'variable.php' }, - { startIndex:24, type: '' }, - { startIndex:25, type: 'delimiter.php' }, - { startIndex:26, type: '' }, - { startIndex:27, type: 'number.php' }, - { startIndex:28, type: 'delimiter.php' }, - { startIndex:29, type: '' }, - { startIndex:30, type: 'delimiter.bracket.php' }, - { startIndex:31, type: '' }, - { startIndex:32, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:17, type: '' }, - { startIndex:18, type: 'metatag.php' } - ]}], - - // Compile Time Constants - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'delimiter.php' }, - { startIndex:17, type: '' }, - { startIndex:18, type: 'constant.php' }, - { startIndex:26, type: 'delimiter.php' }, - { startIndex:27, type: '' }, - { startIndex:28, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:18, type: '' }, - { startIndex:19, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'constant.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - // Predefined Variables - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'keyword.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'variable.predefined.php' }, - { startIndex:16, type: 'delimiter.php' }, - { startIndex:17, type: '' }, - { startIndex:18, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:14, type: '' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:25, type: '' }, - { startIndex:26, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:27, type: '' }, - { startIndex:28, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.predefined.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - // Comments - single line - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'comment.php' }, - { startIndex:28, type: '' }, - { startIndex:29, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'comment.php' }, - { startIndex:33, type: '' }, - { startIndex:34, type: 'number.php' }, - { startIndex:35, type: 'delimiter.php' }, - { startIndex:36, type: '' }, - { startIndex:37, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'comment.php' }, - { startIndex:24, type: '' }, - { startIndex:25, type: 'number.php' }, - { startIndex:26, type: 'delimiter.php' }, - { startIndex:27, type: '' }, - { startIndex:28, type: 'delimiter.php' }, - { startIndex:29, type: '' }, - { startIndex:31, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'comment.php' }, - { startIndex:15, type: 'delimiter.php' }, - { startIndex:16, type: '' }, - { startIndex:17, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'string.php' }, - { startIndex:14, type: 'delimiter.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'string.php' }, - { startIndex:18, type: 'delimiter.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'variable.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'delimiter.php' }, - { startIndex:15, type: '' }, - { startIndex:16, type: 'string.php' }, - { startIndex:27, type: '' }, - { startIndex:28, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.php' }, - { startIndex:7, type: '' }, - { startIndex:8, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.php' }, - { startIndex:7, type: 'delimiter.php' }, - { startIndex:8, type: 'number.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.php' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: 'number.php' }, - { startIndex:12, type: '' }, - { startIndex:13, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.php' }, - { startIndex:7, type: '' }, - { startIndex:8, type: 'delimiter.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'number.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.octal.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.hex.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.hex.php' }, - { startIndex:11, type: '' }, - { startIndex:12, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'number.binary.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'delimiter.bracket.php' }, - { startIndex:7, type: '' }, - { startIndex:8, type: 'delimiter.bracket.php' }, - { startIndex:9, type: '' }, - { startIndex:10, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'delimiter.array.php' }, - { startIndex:7, type: 'number.php' }, - { startIndex:8, type: 'delimiter.php' }, - { startIndex:9, type: 'number.php' }, - { startIndex:10, type: 'delimiter.php' }, - { startIndex:11, type: 'number.php' }, - { startIndex:12, type: 'delimiter.array.php' }, - { startIndex:13, type: '' }, - { startIndex:14, type: 'metatag.php' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'variable.php' }, - { startIndex:8, type: '' }, - { startIndex:9, type: 'delimiter.php' }, - { startIndex:10, type: '' }, - { startIndex:11, type: 'string.php' }, - { startIndex:19, type: '' }, - { startIndex:20, type: 'metatag.php' } - ]}], - - // Comments - comment with sharp - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:6, type: 'comment.php' }, - { startIndex:15, type: 'metatag.php' } - ]}], - - // 3-languages parser - - // php - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:3, type: 'string.php' }, - { startIndex:7, type: 'metatag.php' } - ]}], - - // php/html/php - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: 'number.php' }, - { startIndex:6, type: 'delimiter.php' }, - { startIndex:7, type: 'number.php' }, - { startIndex:8, type: 'metatag.php' }, - { startIndex:10, type: htmlTokenTypes.DELIM_START }, - { startIndex:11, type: htmlTokenTypes.getTag('abc') }, - { startIndex:14, type: htmlTokenTypes.DELIM_START }, - { startIndex:15, type: 'metatag.php' }, - { startIndex:18, type: 'number.php' }, - { startIndex:19, type: 'metatag.php' } - ]}], - - // html/php/html - [{ - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('abc') }, - { startIndex:4, type: htmlTokenTypes.DELIM_START }, - { startIndex:5, type: 'metatag.php' }, - { startIndex:10, type: 'number.php' }, - { startIndex:11, type: 'delimiter.php' }, - { startIndex:12, type: 'number.php' }, - { startIndex:13, type: 'metatag.php' }, - { startIndex:15, type: htmlTokenTypes.DELIM_START }, - { startIndex:16, type: htmlTokenTypes.getTag('abc') }, - { startIndex:19, type: htmlTokenTypes.DELIM_START } - ]}], - - // html/js/php/html - [{ - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('abc') }, - { startIndex:4, type: htmlTokenTypes.DELIM_START }, - { startIndex:5, type: htmlTokenTypes.DELIM_START }, - { startIndex:6, type: htmlTokenTypes.getTag('script') }, - { startIndex:12, type: htmlTokenTypes.DELIM_START }, - { startIndex:13, type: 'mock-js' }, - { startIndex:23, type: htmlTokenTypes.DELIM_END }, - { startIndex:25, type: htmlTokenTypes.getTag('script') }, - { startIndex:31, type: htmlTokenTypes.DELIM_END }, - { startIndex:32, type: 'metatag.php' }, - { startIndex:37, type: 'number.php' }, - { startIndex:38, type: 'delimiter.php' }, - { startIndex:39, type: 'number.php' }, - { startIndex:40, type: 'metatag.php' }, - { startIndex:42, type: htmlTokenTypes.DELIM_START }, - { startIndex:43, type: htmlTokenTypes.getTag('abc') }, - { startIndex:46, type: htmlTokenTypes.DELIM_START } - ]}], - - // html/js/php/js/ - [{ - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('abc') }, - { startIndex:4, type: htmlTokenTypes.DELIM_START }, - { startIndex:5, type: htmlTokenTypes.DELIM_START }, - { startIndex:6, type: htmlTokenTypes.getTag('script') }, - { startIndex:12, type: htmlTokenTypes.DELIM_START }, - { startIndex:13, type: 'mock-js' }, - { startIndex:23, type: htmlTokenTypes.DELIM_END }, - { startIndex:25, type: htmlTokenTypes.getTag('script') }, - { startIndex:31, type: htmlTokenTypes.DELIM_END }, - { startIndex:32, type: 'metatag.php' }, - { startIndex:37, type: 'number.php' }, - { startIndex:38, type: 'delimiter.php' }, - { startIndex:39, type: 'number.php' }, - { startIndex:40, type: 'metatag.php' }, - { startIndex:42, type: htmlTokenTypes.DELIM_START }, - { startIndex:43, type: htmlTokenTypes.getTag('script') }, - { startIndex:49, type: htmlTokenTypes.DELIM_START }, - { startIndex:50, type: 'mock-js' }, - { startIndex:60, type: htmlTokenTypes.DELIM_END }, - { startIndex:62, type: htmlTokenTypes.getTag('script') }, - { startIndex:68, type: htmlTokenTypes.DELIM_END } - ]}], - - // Multiline test - [{ - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('html') }, - { startIndex:5, type: htmlTokenTypes.DELIM_START } - ]}, { - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('style') }, - { startIndex:6, type: htmlTokenTypes.DELIM_START }, - { startIndex:7, type: 'metatag.php' }, - { startIndex:10, type: 'string.php' }, - { startIndex:15, type: 'metatag.php' }, - { startIndex:17, type: 'mock-css' }, - { startIndex:32, type: htmlTokenTypes.DELIM_END }, - { startIndex:34, type: htmlTokenTypes.getTag('style') }, - { startIndex:39, type: htmlTokenTypes.DELIM_END } - ]}, { - line: '', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('style') }, - { startIndex:6, type: htmlTokenTypes.DELIM_START }, - { startIndex:7, type: 'metatag.php' }, - { startIndex:10, type: 'string.php' }, - { startIndex:15, type: 'metatag.php' }, - { startIndex:17, type: 'mock-css' }, - { startIndex:32, type: htmlTokenTypes.DELIM_END }, - { startIndex:34, type: htmlTokenTypes.getTag('style') }, - { startIndex:39, type: htmlTokenTypes.DELIM_END } - ]}], - - // HTML (CSS (PHP)), HTML ( PHP, JS (PHP), PHP) - [{ - line: '*/?> */var y = 4;', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('html') }, - { startIndex:5, type: htmlTokenTypes.DELIM_START }, - { startIndex:6, type: htmlTokenTypes.DELIM_START }, - { startIndex:7, type: htmlTokenTypes.getTag('style') }, - { startIndex:12, type: htmlTokenTypes.DELIM_START }, - { startIndex:13, type: 'metatag.php' }, - { startIndex:16, type: 'string.php' }, - { startIndex:21, type: 'metatag.php' }, - { startIndex:23, type: 'mock-css' }, - { startIndex:39, type: htmlTokenTypes.DELIM_END }, - { startIndex:41, type: htmlTokenTypes.getTag('style') }, - { startIndex:46, type: htmlTokenTypes.DELIM_END }, - { startIndex:47, type: htmlTokenTypes.DELIM_COMMENT }, - { startIndex:51, type: 'metatag.php' }, - { startIndex:54, type: 'string.php' }, - { startIndex:68, type: 'metatag.php' }, - { startIndex:70, type: htmlTokenTypes.DELIM_COMMENT }, - { startIndex:73, type: htmlTokenTypes.DELIM_START }, - { startIndex:74, type: htmlTokenTypes.getTag('script') }, - { startIndex:80, type: htmlTokenTypes.DELIM_START }, - { startIndex:81, type: 'mock-js' }, - { startIndex:94, type: 'metatag.php' }, - { startIndex:97, type: 'string.php' }, - { startIndex:109, type: 'comment.php' }, - { startIndex:122, type: 'metatag.php' }, - { startIndex:124, type: 'mock-js' }, - { startIndex:137, type: htmlTokenTypes.DELIM_END }, - { startIndex:139, type: htmlTokenTypes.getTag('script') }, - { startIndex:145, type: htmlTokenTypes.DELIM_END }, - { startIndex:146, type: htmlTokenTypes.DELIM_END }, - { startIndex:148, type: htmlTokenTypes.getTag('html') }, - { startIndex:152, type: htmlTokenTypes.DELIM_END }, - { startIndex:153, type: 'metatag.php' }, - { startIndex:155, type: '' }, - { startIndex:156, type: 'variable.php' }, - { startIndex:158, type: '' }, - { startIndex:159, type: 'delimiter.php' }, - { startIndex:160, type: '' }, - { startIndex:161, type: 'number.php' }, - { startIndex:162, type: 'delimiter.php' }, - { startIndex:163, type: 'metatag.php' } - ]}], - - // PHP-tag detection - [{ - line: '//""', - tokens: [ - { startIndex:0, type: htmlTokenTypes.DELIM_START }, - { startIndex:1, type: htmlTokenTypes.getTag('script') }, - { startIndex:7, type: htmlTokenTypes.DELIM_START }, - { startIndex:8, type: 'mock-js' }, - { startIndex:9, type: 'metatag.php' }, - { startIndex:14, type: 'number.php' }, - { startIndex:15, type: 'delimiter.php' }, - { startIndex:16, type: 'number.php' }, - { startIndex:17, type: 'metatag.php' }, - { startIndex:19, type: 'mock-js' } - ]}], - - [{ - line: '', - tokens: [ - { startIndex:0, type: 'metatag.php' }, - { startIndex:5, type: '' }, - { startIndex:14, type: 'delimiter.parenthesis.php' }, - { startIndex:16, type: 'delimiter.php' }, - { startIndex:17, type: '' }, - { startIndex:18, type: 'metatag.php' } - ]}] - ]); - }); - - test('Word definition', function() { - assertWords('a b cde'.match(wordDefinition), ['a', 'b', 'cde']); - assertWords('$count = count($cards);'.match(wordDefinition), ['$count', 'count', '$cards']); - }); - - test('onEnter', function() { - assertOnEnter.indents('', 'if (true) {', ''); - assertOnEnter.indents('', '$arr = [', ''); - assertOnEnter.indentsOutdents('', '$arr = [', ']'); - }); -});