diff --git a/package.json b/package.json index 83287038b3c..747fdadb40e 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "vscode-policy-watcher": "^1.1.1", "vscode-proxy-agent": "^0.12.0", "vscode-regexpp": "^3.1.0", - "vscode-textmate": "7.0.1", + "vscode-textmate": "8.0.0", "xterm": "5.1.0-beta.63", "xterm-addon-canvas": "0.3.0-beta.27", "xterm-addon-search": "0.11.0-beta.7", diff --git a/remote/package.json b/remote/package.json index afb2c986107..b8fa5135d3d 100644 --- a/remote/package.json +++ b/remote/package.json @@ -23,7 +23,7 @@ "vscode-oniguruma": "1.7.0", "vscode-proxy-agent": "^0.12.0", "vscode-regexpp": "^3.1.0", - "vscode-textmate": "7.0.1", + "vscode-textmate": "8.0.0", "xterm": "5.1.0-beta.63", "xterm-addon-canvas": "0.3.0-beta.27", "xterm-addon-search": "0.11.0-beta.7", diff --git a/remote/web/package.json b/remote/web/package.json index 616c154d657..856a44c8b30 100644 --- a/remote/web/package.json +++ b/remote/web/package.json @@ -10,7 +10,7 @@ "jschardet": "3.0.0", "tas-client-umd": "0.1.6", "vscode-oniguruma": "1.7.0", - "vscode-textmate": "7.0.1", + "vscode-textmate": "8.0.0", "xterm": "5.1.0-beta.63", "xterm-addon-canvas": "0.3.0-beta.27", "xterm-addon-search": "0.11.0-beta.7", diff --git a/remote/web/yarn.lock b/remote/web/yarn.lock index ebec51fb039..8692de7fd84 100644 --- a/remote/web/yarn.lock +++ b/remote/web/yarn.lock @@ -63,10 +63,10 @@ vscode-oniguruma@1.7.0: resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== -vscode-textmate@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79" - integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== +vscode-textmate@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== xterm-addon-canvas@0.3.0-beta.27: version "0.3.0-beta.27" diff --git a/remote/yarn.lock b/remote/yarn.lock index 3ce6947a231..ed2a8db1b4c 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -757,10 +757,10 @@ vscode-regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f" integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg== -vscode-textmate@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79" - integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== +vscode-textmate@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== vscode-windows-ca-certs@^0.3.0: version "0.3.0" diff --git a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts index 391596495aa..e2059ecf3ea 100644 --- a/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts +++ b/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.ts @@ -22,7 +22,7 @@ import { ILanguageService } from 'vs/editor/common/languages/language'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { findMatchingThemeRule } from 'vs/workbench/services/textMate/common/TMHelper'; import { ITextMateService } from 'vs/workbench/services/textMate/browser/textMate'; -import type { IGrammar, IToken, StackElement } from 'vscode-textmate'; +import type { IGrammar, IToken, StateStack } from 'vscode-textmate'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import { ColorThemeData, TokenStyleDefinitions, TokenStyleDefinition, TextMateThemingRuleDefinitions } from 'vs/workbench/services/themes/common/colorThemeData'; @@ -511,8 +511,8 @@ class InspectEditorTokensWidget extends Disposable implements IContentWidget { }; } - private _getStateBeforeLine(grammar: IGrammar, lineNumber: number): StackElement | null { - let state: StackElement | null = null; + private _getStateBeforeLine(grammar: IGrammar, lineNumber: number): StateStack | null { + let state: StateStack | null = null; for (let i = 1; i < lineNumber; i++) { const tokenizationResult = grammar.tokenizeLine(this._model.getLineContent(i), state); diff --git a/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts b/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts index 8560807503e..e79f9d92b69 100644 --- a/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts +++ b/src/vs/workbench/contrib/themes/browser/themes.test.contribution.ts @@ -11,7 +11,7 @@ import { IWorkbenchThemeService, IWorkbenchColorTheme } from 'vs/workbench/servi import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { EditorResourceAccessor } from 'vs/workbench/common/editor'; import { ITextMateService } from 'vs/workbench/services/textMate/browser/textMate'; -import type { IGrammar, StackElement } from 'vscode-textmate'; +import type { IGrammar, StateStack } from 'vscode-textmate'; import { TokenizationRegistry } from 'vs/editor/common/languages'; import { TokenMetadata } from 'vs/editor/common/encodedTokenAttributes'; import { ThemeRule, findMatchingThemeRule } from 'vs/workbench/services/textMate/common/TMHelper'; @@ -98,7 +98,7 @@ class Snapper { private _themedTokenize(grammar: IGrammar, lines: string[]): IThemedToken[] { const colorMap = TokenizationRegistry.getColorMap(); - let state: StackElement | null = null; + let state: StateStack | null = null; const result: IThemedToken[] = []; let resultLen = 0; for (let i = 0, len = lines.length; i < len; i++) { @@ -127,7 +127,7 @@ class Snapper { } private _tokenize(grammar: IGrammar, lines: string[]): IToken[] { - let state: StackElement | null = null; + let state: StateStack | null = null; const result: IToken[] = []; let resultLen = 0; for (let i = 0, len = lines.length; i < len; i++) { diff --git a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts index 2f45c4699cf..f2454a73bbc 100644 --- a/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts +++ b/src/vs/workbench/services/textMate/browser/abstractTextMateService.ts @@ -23,7 +23,7 @@ import { ExtensionMessageCollector } from 'vs/workbench/services/extensions/comm import { ITMSyntaxExtensionPoint, grammarsExtPoint } from 'vs/workbench/services/textMate/common/TMGrammars'; import { ITextMateService } from 'vs/workbench/services/textMate/browser/textMate'; import { ITextMateThemingRule, IWorkbenchThemeService, IWorkbenchColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; -import type { IGrammar, StackElement, IOnigLib, IRawTheme } from 'vscode-textmate'; +import type { IGrammar, StateStack, IOnigLib, IRawTheme } from 'vscode-textmate'; import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IValidGrammarDefinition, IValidEmbeddedLanguagesMap, IValidTokenTypeMap } from 'vs/workbench/services/textMate/common/TMScopeRegistry'; @@ -449,7 +449,7 @@ class TMTokenizationSupportWithLineLimit implements ITokenizationSupport { throw new Error('Not supported!'); } - tokenizeEncoded(line: string, hasEOL: boolean, state: StackElement): EncodedTokenizationResult { + tokenizeEncoded(line: string, hasEOL: boolean, state: StateStack): EncodedTokenizationResult { // Do not attempt to tokenize if a line is too long if (line.length >= this._maxTokenizationLineLength) { return nullTokenizeEncoded(this._encodedLanguageId, state); diff --git a/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts b/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts index 1e9480e81a3..618df4a7da6 100644 --- a/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts +++ b/src/vs/workbench/services/textMate/common/TMGrammarFactory.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import type { IGrammar, Registry, StackElement, IRawTheme, IOnigLib } from 'vscode-textmate'; +import type { IGrammar, Registry, StateStack, IOnigLib, IRawTheme } from 'vscode-textmate'; import { Disposable } from 'vs/base/common/lifecycle'; import { TMScopeRegistry, IValidGrammarDefinition, IValidEmbeddedLanguagesMap } from 'vs/workbench/services/textMate/common/TMScopeRegistry'; @@ -17,7 +17,7 @@ interface ITMGrammarFactoryHost { export interface ICreateGrammarResult { languageId: string; grammar: IGrammar | null; - initialState: StackElement; + initialState: StateStack; containsEmbeddedLanguages: boolean; } @@ -26,7 +26,7 @@ export const missingTMGrammarErrorMessage = 'No TM Grammar registered for this l export class TMGrammarFactory extends Disposable { private readonly _host: ITMGrammarFactoryHost; - private readonly _initialState: StackElement; + private readonly _initialState: StateStack; private readonly _scopeRegistry: TMScopeRegistry; private readonly _injections: { [scopeName: string]: string[] }; private readonly _injectedEmbeddedLanguages: { [scopeName: string]: IValidEmbeddedLanguagesMap[] }; diff --git a/src/vs/workbench/services/textMate/common/TMTokenization.ts b/src/vs/workbench/services/textMate/common/TMTokenization.ts index d5265f8181c..3e250fc4266 100644 --- a/src/vs/workbench/services/textMate/common/TMTokenization.ts +++ b/src/vs/workbench/services/textMate/common/TMTokenization.ts @@ -6,7 +6,7 @@ import { Emitter, Event } from 'vs/base/common/event'; import { IState, ITokenizationSupport, TokenizationResult, EncodedTokenizationResult } from 'vs/editor/common/languages'; import { LanguageId, TokenMetadata } from 'vs/editor/common/encodedTokenAttributes'; -import type { IGrammar, StackElement } from 'vscode-textmate'; +import type { IGrammar, StateStack } from 'vscode-textmate'; import { Disposable } from 'vs/base/common/lifecycle'; export class TMTokenization extends Disposable implements ITokenizationSupport { @@ -14,12 +14,12 @@ export class TMTokenization extends Disposable implements ITokenizationSupport { private readonly _grammar: IGrammar; private readonly _containsEmbeddedLanguages: boolean; private readonly _seenLanguages: boolean[]; - private readonly _initialState: StackElement; + private readonly _initialState: StateStack; private readonly _onDidEncounterLanguage: Emitter = this._register(new Emitter()); public readonly onDidEncounterLanguage: Event = this._onDidEncounterLanguage.event; - constructor(grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean) { + constructor(grammar: IGrammar, initialState: StateStack, containsEmbeddedLanguages: boolean) { super(); this._grammar = grammar; this._initialState = initialState; @@ -35,7 +35,7 @@ export class TMTokenization extends Disposable implements ITokenizationSupport { throw new Error('Not supported!'); } - public tokenizeEncoded(line: string, hasEOL: boolean, state: StackElement): EncodedTokenizationResult { + public tokenizeEncoded(line: string, hasEOL: boolean, state: StateStack): EncodedTokenizationResult { const textMateResult = this._grammar.tokenizeLine2(line, state, 500); if (textMateResult.stoppedEarly) { @@ -60,7 +60,7 @@ export class TMTokenization extends Disposable implements ITokenizationSupport { } } - let endState: StackElement; + let endState: StateStack; // try to save an object if possible if (state.equals(textMateResult.ruleStack)) { endState = state; diff --git a/yarn.lock b/yarn.lock index 53f19aacc16..f8486a690ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11295,10 +11295,10 @@ vscode-regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz#42d059b6fffe99bd42939c0d013f632f0cad823f" integrity sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg== -vscode-textmate@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-7.0.1.tgz#8118a32b02735dccd14f893b495fa5389ad7de79" - integrity sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw== +vscode-textmate@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== vscode-uri@^3.0.6: version "3.0.6"