initial vitepress site with basic nav
This commit is contained in:
parent
a7df2e049d
commit
2029f16583
1900 changed files with 1014692 additions and 0 deletions
1
node_modules/vscode-textmate/.gitattributes
generated
vendored
Normal file
1
node_modules/vscode-textmate/.gitattributes
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
* text=auto
|
16
node_modules/vscode-textmate/.github/workflows/ci.yml
generated
vendored
Normal file
16
node_modules/vscode-textmate/.github/workflows/ci.yml
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
name: CI
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
- run: npm ci
|
||||
- run: npm run compile
|
||||
- run: npm test
|
31
node_modules/vscode-textmate/.github/workflows/rich-navigation.yml
generated
vendored
Normal file
31
node_modules/vscode-textmate/.github/workflows/rich-navigation.yml
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: "Rich Navigation Indexing"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
|
||||
jobs:
|
||||
richnav:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- uses: microsoft/RichCodeNavIndexer@v0.1
|
||||
with:
|
||||
languages: typescript
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
typescriptVersion: 0.6.0-next.19
|
||||
configFiles: .lsifrc.json
|
||||
continue-on-error: true
|
||||
|
6
node_modules/vscode-textmate/.lsifrc.json
generated
vendored
Normal file
6
node_modules/vscode-textmate/.lsifrc.json
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"project": "./tsconfig.json",
|
||||
"out": "vscode-textmate.lsif",
|
||||
"source": "./package.json",
|
||||
"package": "./package.json"
|
||||
}
|
21
node_modules/vscode-textmate/LICENSE.md
generated
vendored
Normal file
21
node_modules/vscode-textmate/LICENSE.md
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
130
node_modules/vscode-textmate/README.md
generated
vendored
Normal file
130
node_modules/vscode-textmate/README.md
generated
vendored
Normal file
|
@ -0,0 +1,130 @@
|
|||
# VSCode TextMate [](https://dev.azure.com/ms/vscode-textmate/_build/latest?definitionId=172&branchName=master)
|
||||
|
||||
An interpreter for grammar files as defined by TextMate. TextMate grammars use the oniguruma dialect (https://github.com/kkos/oniguruma). Supports loading grammar files from JSON or PLIST format. This library is used in VS Code. Cross - grammar injections are currently not supported.
|
||||
|
||||
## Installing
|
||||
|
||||
```sh
|
||||
npm install vscode-textmate
|
||||
```
|
||||
|
||||
## Using
|
||||
|
||||
```javascript
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const vsctm = require('vscode-textmate');
|
||||
const oniguruma = require('vscode-oniguruma');
|
||||
|
||||
/**
|
||||
* Utility to read a file as a promise
|
||||
*/
|
||||
function readFile(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readFile(path, (error, data) => error ? reject(error) : resolve(data));
|
||||
})
|
||||
}
|
||||
|
||||
const wasmBin = fs.readFileSync(path.join(__dirname, './node_modules/vscode-oniguruma/release/onig.wasm')).buffer;
|
||||
const vscodeOnigurumaLib = oniguruma.loadWASM(wasmBin).then(() => {
|
||||
return {
|
||||
createOnigScanner(patterns) { return new oniguruma.OnigScanner(patterns); },
|
||||
createOnigString(s) { return new oniguruma.OnigString(s); }
|
||||
};
|
||||
});
|
||||
|
||||
// Create a registry that can create a grammar from a scope name.
|
||||
const registry = new vsctm.Registry({
|
||||
onigLib: vscodeOnigurumaLib,
|
||||
loadGrammar: (scopeName) => {
|
||||
if (scopeName === 'source.js') {
|
||||
// https://github.com/textmate/javascript.tmbundle/blob/master/Syntaxes/JavaScript.plist
|
||||
return readFile('./JavaScript.plist').then(data => vsctm.parseRawGrammar(data.toString()))
|
||||
}
|
||||
console.log(`Unknown scope name: ${scopeName}`);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
// Load the JavaScript grammar and any other grammars included by it async.
|
||||
registry.loadGrammar('source.js').then(grammar => {
|
||||
const text = [
|
||||
`function sayHello(name) {`,
|
||||
`\treturn "Hello, " + name;`,
|
||||
`}`
|
||||
];
|
||||
let ruleStack = vsctm.INITIAL;
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const line = text[i];
|
||||
const lineTokens = grammar.tokenizeLine(line, ruleStack);
|
||||
console.log(`\nTokenizing line: ${line}`);
|
||||
for (let j = 0; j < lineTokens.tokens.length; j++) {
|
||||
const token = lineTokens.tokens[j];
|
||||
console.log(` - token from ${token.startIndex} to ${token.endIndex} ` +
|
||||
`(${line.substring(token.startIndex, token.endIndex)}) ` +
|
||||
`with scopes ${token.scopes.join(', ')}`
|
||||
);
|
||||
}
|
||||
ruleStack = lineTokens.ruleStack;
|
||||
}
|
||||
});
|
||||
|
||||
/* OUTPUT:
|
||||
|
||||
Unknown scope name: source.js.regexp
|
||||
|
||||
Tokenizing line: function sayHello(name) {
|
||||
- token from 0 to 8 (function) with scopes source.js, meta.function.js, storage.type.function.js
|
||||
- token from 8 to 9 ( ) with scopes source.js, meta.function.js
|
||||
- token from 9 to 17 (sayHello) with scopes source.js, meta.function.js, entity.name.function.js
|
||||
- token from 17 to 18 (() with scopes source.js, meta.function.js, punctuation.definition.parameters.begin.js
|
||||
- token from 18 to 22 (name) with scopes source.js, meta.function.js, variable.parameter.function.js
|
||||
- token from 22 to 23 ()) with scopes source.js, meta.function.js, punctuation.definition.parameters.end.js
|
||||
- token from 23 to 24 ( ) with scopes source.js
|
||||
- token from 24 to 25 ({) with scopes source.js, punctuation.section.scope.begin.js
|
||||
|
||||
Tokenizing line: return "Hello, " + name;
|
||||
- token from 0 to 1 ( ) with scopes source.js
|
||||
- token from 1 to 7 (return) with scopes source.js, keyword.control.js
|
||||
- token from 7 to 8 ( ) with scopes source.js
|
||||
- token from 8 to 9 (") with scopes source.js, string.quoted.double.js, punctuation.definition.string.begin.js
|
||||
- token from 9 to 16 (Hello, ) with scopes source.js, string.quoted.double.js
|
||||
- token from 16 to 17 (") with scopes source.js, string.quoted.double.js, punctuation.definition.string.end.js
|
||||
- token from 17 to 18 ( ) with scopes source.js
|
||||
- token from 18 to 19 (+) with scopes source.js, keyword.operator.arithmetic.js
|
||||
- token from 19 to 20 ( ) with scopes source.js
|
||||
- token from 20 to 24 (name) with scopes source.js, support.constant.dom.js
|
||||
- token from 24 to 25 (;) with scopes source.js, punctuation.terminator.statement.js
|
||||
|
||||
Tokenizing line: }
|
||||
- token from 0 to 1 (}) with scopes source.js, punctuation.section.scope.end.js
|
||||
|
||||
*/
|
||||
|
||||
```
|
||||
|
||||
## For grammar authors
|
||||
|
||||
See [vscode-tmgrammar-test](https://github.com/PanAeon/vscode-tmgrammar-test) that can help you write unit tests against your grammar.
|
||||
|
||||
## API doc
|
||||
|
||||
See [the main.ts file](./src/main.ts)
|
||||
|
||||
## Developing
|
||||
|
||||
* Clone the repository
|
||||
* Run `npm install`
|
||||
* Compile in the background with `npm run watch`
|
||||
* Run tests with `npm test`
|
||||
* Run benchmark with `npm run benchmark`
|
||||
* Troubleshoot a grammar with `npm run inspect -- PATH_TO_GRAMMAR PATH_TO_FILE`
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
|
||||
## License
|
||||
[MIT](https://github.com/Microsoft/vscode-textmate/blob/master/LICENSE.md)
|
||||
|
41
node_modules/vscode-textmate/SECURITY.md
generated
vendored
Normal file
41
node_modules/vscode-textmate/SECURITY.md
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
|
||||
|
||||
## Security
|
||||
|
||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
||||
|
||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
||||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
||||
* Full paths of source file(s) related to the manifestation of the issue
|
||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
||||
* Any special configuration required to reproduce the issue
|
||||
* Step-by-step instructions to reproduce the issue
|
||||
* Proof-of-concept or exploit code (if possible)
|
||||
* Impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
|
||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
||||
|
||||
## Preferred Languages
|
||||
|
||||
We prefer all communications to be in English.
|
||||
|
||||
## Policy
|
||||
|
||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
||||
|
||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
40
node_modules/vscode-textmate/package.json
generated
vendored
Normal file
40
node_modules/vscode-textmate/package.json
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "vscode-textmate",
|
||||
"version": "8.0.0",
|
||||
"description": "VSCode TextMate grammar helpers",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
"main": "./release/main.js",
|
||||
"typings": "./release/main.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/microsoft/vscode-textmate"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/microsoft/vscode-textmate/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "tsc --watch",
|
||||
"compile": "tsc",
|
||||
"test": "mocha --ui=tdd ./out/tests/all.test.js",
|
||||
"benchmark": "node benchmark/benchmark.js",
|
||||
"inspect": "node out/tests/inspect.js",
|
||||
"tmconvert": "node scripts/tmconvert.js",
|
||||
"version": "npm run compile && npm run test",
|
||||
"postversion": "git push && git push --tags",
|
||||
"prepublishOnly": "tsc && webpack --progress",
|
||||
"bundle": "webpack"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^9.1.0",
|
||||
"@types/node": "^16.6.1",
|
||||
"copy-webpack-plugin": "^9.1.0",
|
||||
"mocha": "^9.2.2",
|
||||
"typescript": "^4.3.5",
|
||||
"vscode-oniguruma": "^1.5.1",
|
||||
"webpack": "^5.50.0",
|
||||
"webpack-cli": "^4.8.0"
|
||||
}
|
||||
}
|
4
node_modules/vscode-textmate/release/debug.d.ts
generated
vendored
Normal file
4
node_modules/vscode-textmate/release/debug.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
export declare const DebugFlags: {
|
||||
InDebugMode: boolean;
|
||||
};
|
||||
export declare const UseOnigurumaFindOptions = false;
|
31
node_modules/vscode-textmate/release/encodedTokenAttributes.d.ts
generated
vendored
Normal file
31
node_modules/vscode-textmate/release/encodedTokenAttributes.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { FontStyle } from "./theme";
|
||||
export declare type EncodedTokenAttributes = number;
|
||||
export declare namespace EncodedTokenAttributes {
|
||||
function toBinaryStr(encodedTokenAttributes: EncodedTokenAttributes): string;
|
||||
function print(encodedTokenAttributes: EncodedTokenAttributes): void;
|
||||
function getLanguageId(encodedTokenAttributes: EncodedTokenAttributes): number;
|
||||
function getTokenType(encodedTokenAttributes: EncodedTokenAttributes): StandardTokenType;
|
||||
function containsBalancedBrackets(encodedTokenAttributes: EncodedTokenAttributes): boolean;
|
||||
function getFontStyle(encodedTokenAttributes: EncodedTokenAttributes): number;
|
||||
function getForeground(encodedTokenAttributes: EncodedTokenAttributes): number;
|
||||
function getBackground(encodedTokenAttributes: EncodedTokenAttributes): number;
|
||||
/**
|
||||
* Updates the fields in `metadata`.
|
||||
* A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
|
||||
*/
|
||||
function set(encodedTokenAttributes: EncodedTokenAttributes, languageId: number, tokenType: OptionalStandardTokenType, containsBalancedBrackets: boolean | null, fontStyle: FontStyle, foreground: number, background: number): number;
|
||||
}
|
||||
export declare const enum StandardTokenType {
|
||||
Other = 0,
|
||||
Comment = 1,
|
||||
String = 2,
|
||||
RegEx = 3
|
||||
}
|
||||
export declare function toOptionalTokenType(standardType: StandardTokenType): OptionalStandardTokenType;
|
||||
export declare const enum OptionalStandardTokenType {
|
||||
Other = 0,
|
||||
Comment = 1,
|
||||
String = 2,
|
||||
RegEx = 3,
|
||||
NotSet = 8
|
||||
}
|
24
node_modules/vscode-textmate/release/grammar/basicScopesAttributeProvider.d.ts
generated
vendored
Normal file
24
node_modules/vscode-textmate/release/grammar/basicScopesAttributeProvider.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { OptionalStandardTokenType } from "../encodedTokenAttributes";
|
||||
import { IEmbeddedLanguagesMap } from "../main";
|
||||
import { ScopeName } from "../theme";
|
||||
export declare class BasicScopeAttributes {
|
||||
readonly languageId: number;
|
||||
readonly tokenType: OptionalStandardTokenType;
|
||||
constructor(languageId: number, tokenType: OptionalStandardTokenType);
|
||||
}
|
||||
export declare class BasicScopeAttributesProvider {
|
||||
private readonly _defaultAttributes;
|
||||
private readonly _embeddedLanguagesMatcher;
|
||||
constructor(initialLanguageId: number, embeddedLanguages: IEmbeddedLanguagesMap | null);
|
||||
getDefaultAttributes(): BasicScopeAttributes;
|
||||
getBasicScopeAttributes(scopeName: ScopeName | null): BasicScopeAttributes;
|
||||
private static readonly _NULL_SCOPE_METADATA;
|
||||
private readonly _getBasicScopeAttributes;
|
||||
/**
|
||||
* Given a produced TM scope, return the language that token describes or null if unknown.
|
||||
* e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null
|
||||
*/
|
||||
private _scopeToLanguage;
|
||||
private _toStandardTokenType;
|
||||
private static STANDARD_TOKEN_TYPE_REGEXP;
|
||||
}
|
198
node_modules/vscode-textmate/release/grammar/grammar.d.ts
generated
vendored
Normal file
198
node_modules/vscode-textmate/release/grammar/grammar.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,198 @@
|
|||
import { EncodedTokenAttributes, StandardTokenType } from '../encodedTokenAttributes';
|
||||
import { IEmbeddedLanguagesMap, IGrammar, IToken, ITokenizeLineResult, ITokenizeLineResult2, ITokenTypeMap, StateStack as StackElementDef } from '../main';
|
||||
import { Matcher } from '../matcher';
|
||||
import { IOnigLib, OnigScanner, OnigString } from '../onigLib';
|
||||
import { IRawGrammar, IRawRepository } from '../rawGrammar';
|
||||
import { IRuleFactoryHelper, IRuleRegistry, Rule, RuleId } from '../rule';
|
||||
import { ScopeName, ScopePath, ScopeStack, StyleAttributes } from '../theme';
|
||||
import { BasicScopeAttributes } from './basicScopesAttributeProvider';
|
||||
export declare function createGrammar(scopeName: ScopeName, grammar: IRawGrammar, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap | null, tokenTypes: ITokenTypeMap | null, balancedBracketSelectors: BalancedBracketSelectors | null, grammarRepository: IGrammarRepository & IThemeProvider, onigLib: IOnigLib): Grammar;
|
||||
export interface IThemeProvider {
|
||||
themeMatch(scopePath: ScopeStack): StyleAttributes | null;
|
||||
getDefaults(): StyleAttributes;
|
||||
}
|
||||
export interface IGrammarRepository {
|
||||
lookup(scopeName: ScopeName): IRawGrammar | undefined;
|
||||
injections(scopeName: ScopeName): ScopeName[];
|
||||
}
|
||||
export interface Injection {
|
||||
readonly debugSelector: string;
|
||||
readonly matcher: Matcher<string[]>;
|
||||
readonly priority: -1 | 0 | 1;
|
||||
readonly ruleId: RuleId;
|
||||
readonly grammar: IRawGrammar;
|
||||
}
|
||||
export declare class Grammar implements IGrammar, IRuleFactoryHelper, IOnigLib {
|
||||
private readonly _rootScopeName;
|
||||
private readonly balancedBracketSelectors;
|
||||
private readonly _onigLib;
|
||||
private _rootId;
|
||||
private _lastRuleId;
|
||||
private readonly _ruleId2desc;
|
||||
private readonly _includedGrammars;
|
||||
private readonly _grammarRepository;
|
||||
private readonly _grammar;
|
||||
private _injections;
|
||||
private readonly _basicScopeAttributesProvider;
|
||||
private readonly _tokenTypeMatchers;
|
||||
get themeProvider(): IThemeProvider;
|
||||
constructor(_rootScopeName: ScopeName, grammar: IRawGrammar, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap | null, tokenTypes: ITokenTypeMap | null, balancedBracketSelectors: BalancedBracketSelectors | null, grammarRepository: IGrammarRepository & IThemeProvider, _onigLib: IOnigLib);
|
||||
dispose(): void;
|
||||
createOnigScanner(sources: string[]): OnigScanner;
|
||||
createOnigString(sources: string): OnigString;
|
||||
getMetadataForScope(scope: string): BasicScopeAttributes;
|
||||
private _collectInjections;
|
||||
getInjections(): Injection[];
|
||||
registerRule<T extends Rule>(factory: (id: RuleId) => T): T;
|
||||
getRule(ruleId: RuleId): Rule;
|
||||
getExternalGrammar(scopeName: string, repository?: IRawRepository): IRawGrammar | undefined;
|
||||
tokenizeLine(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult;
|
||||
tokenizeLine2(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult2;
|
||||
private _tokenize;
|
||||
}
|
||||
export declare class AttributedScopeStack {
|
||||
readonly parent: AttributedScopeStack | null;
|
||||
readonly scopePath: ScopeStack;
|
||||
readonly tokenAttributes: EncodedTokenAttributes;
|
||||
static createRoot(scopeName: ScopeName, tokenAttributes: EncodedTokenAttributes): AttributedScopeStack;
|
||||
static createRootAndLookUpScopeName(scopeName: ScopeName, tokenAttributes: EncodedTokenAttributes, grammar: Grammar): AttributedScopeStack;
|
||||
get scopeName(): ScopeName;
|
||||
private constructor();
|
||||
equals(other: AttributedScopeStack): boolean;
|
||||
private static _equals;
|
||||
private static mergeAttributes;
|
||||
pushAttributed(scopePath: ScopePath | null, grammar: Grammar): AttributedScopeStack;
|
||||
private static _pushAttributed;
|
||||
getScopeNames(): string[];
|
||||
}
|
||||
/**
|
||||
* Represents a "pushed" state on the stack (as a linked list element).
|
||||
*/
|
||||
export declare class StateStack implements StackElementDef {
|
||||
/**
|
||||
* The previous state on the stack (or null for the root state).
|
||||
*/
|
||||
readonly parent: StateStack | null;
|
||||
/**
|
||||
* The state (rule) that this element represents.
|
||||
*/
|
||||
private readonly ruleId;
|
||||
/**
|
||||
* The state has entered and captured \n. This means that the next line should have an anchorPosition of 0.
|
||||
*/
|
||||
readonly beginRuleCapturedEOL: boolean;
|
||||
/**
|
||||
* The "pop" (end) condition for this state in case that it was dynamically generated through captured text.
|
||||
*/
|
||||
readonly endRule: string | null;
|
||||
/**
|
||||
* The list of scopes containing the "name" for this state.
|
||||
*/
|
||||
readonly nameScopesList: AttributedScopeStack;
|
||||
/**
|
||||
* The list of scopes containing the "contentName" (besides "name") for this state.
|
||||
* This list **must** contain as an element `scopeName`.
|
||||
*/
|
||||
readonly contentNameScopesList: AttributedScopeStack;
|
||||
_stackElementBrand: void;
|
||||
static NULL: StateStack;
|
||||
/**
|
||||
* The position on the current line where this state was pushed.
|
||||
* This is relevant only while tokenizing a line, to detect endless loops.
|
||||
* Its value is meaningless across lines.
|
||||
*/
|
||||
private _enterPos;
|
||||
/**
|
||||
* The captured anchor position when this stack element was pushed.
|
||||
* This is relevant only while tokenizing a line, to restore the anchor position when popping.
|
||||
* Its value is meaningless across lines.
|
||||
*/
|
||||
private _anchorPos;
|
||||
/**
|
||||
* The depth of the stack.
|
||||
*/
|
||||
readonly depth: number;
|
||||
constructor(
|
||||
/**
|
||||
* The previous state on the stack (or null for the root state).
|
||||
*/
|
||||
parent: StateStack | null,
|
||||
/**
|
||||
* The state (rule) that this element represents.
|
||||
*/
|
||||
ruleId: RuleId, enterPos: number, anchorPos: number,
|
||||
/**
|
||||
* The state has entered and captured \n. This means that the next line should have an anchorPosition of 0.
|
||||
*/
|
||||
beginRuleCapturedEOL: boolean,
|
||||
/**
|
||||
* The "pop" (end) condition for this state in case that it was dynamically generated through captured text.
|
||||
*/
|
||||
endRule: string | null,
|
||||
/**
|
||||
* The list of scopes containing the "name" for this state.
|
||||
*/
|
||||
nameScopesList: AttributedScopeStack,
|
||||
/**
|
||||
* The list of scopes containing the "contentName" (besides "name") for this state.
|
||||
* This list **must** contain as an element `scopeName`.
|
||||
*/
|
||||
contentNameScopesList: AttributedScopeStack);
|
||||
equals(other: StateStack): boolean;
|
||||
private static _equals;
|
||||
/**
|
||||
* A structural equals check. Does not take into account `scopes`.
|
||||
*/
|
||||
private static _structuralEquals;
|
||||
clone(): StateStack;
|
||||
private static _reset;
|
||||
reset(): void;
|
||||
pop(): StateStack | null;
|
||||
safePop(): StateStack;
|
||||
push(ruleId: RuleId, enterPos: number, anchorPos: number, beginRuleCapturedEOL: boolean, endRule: string | null, nameScopesList: AttributedScopeStack, contentNameScopesList: AttributedScopeStack): StateStack;
|
||||
getEnterPos(): number;
|
||||
getAnchorPos(): number;
|
||||
getRule(grammar: IRuleRegistry): Rule;
|
||||
toString(): string;
|
||||
private _writeString;
|
||||
withContentNameScopesList(contentNameScopeStack: AttributedScopeStack): StateStack;
|
||||
withEndRule(endRule: string): StateStack;
|
||||
hasSameRuleAs(other: StateStack): boolean;
|
||||
}
|
||||
interface TokenTypeMatcher {
|
||||
readonly matcher: Matcher<string[]>;
|
||||
readonly type: StandardTokenType;
|
||||
}
|
||||
export declare class BalancedBracketSelectors {
|
||||
private readonly balancedBracketScopes;
|
||||
private readonly unbalancedBracketScopes;
|
||||
private allowAny;
|
||||
constructor(balancedBracketScopes: string[], unbalancedBracketScopes: string[]);
|
||||
get matchesAlways(): boolean;
|
||||
get matchesNever(): boolean;
|
||||
match(scopes: string[]): boolean;
|
||||
}
|
||||
export declare class LineTokens {
|
||||
private readonly balancedBracketSelectors;
|
||||
private readonly _emitBinaryTokens;
|
||||
/**
|
||||
* defined only if `DebugFlags.InDebugMode`.
|
||||
*/
|
||||
private readonly _lineText;
|
||||
/**
|
||||
* used only if `_emitBinaryTokens` is false.
|
||||
*/
|
||||
private readonly _tokens;
|
||||
/**
|
||||
* used only if `_emitBinaryTokens` is true.
|
||||
*/
|
||||
private readonly _binaryTokens;
|
||||
private _lastTokenEndIndex;
|
||||
private readonly _tokenTypeOverrides;
|
||||
constructor(emitBinaryTokens: boolean, lineText: string, tokenTypeOverrides: TokenTypeMatcher[], balancedBracketSelectors: BalancedBracketSelectors | null);
|
||||
produce(stack: StateStack, endIndex: number): void;
|
||||
produceFromScopes(scopesList: AttributedScopeStack, endIndex: number): void;
|
||||
getResult(stack: StateStack, lineLength: number): IToken[];
|
||||
getBinaryResult(stack: StateStack, lineLength: number): Uint32Array;
|
||||
}
|
||||
export {};
|
68
node_modules/vscode-textmate/release/grammar/grammarDependencies.d.ts
generated
vendored
Normal file
68
node_modules/vscode-textmate/release/grammar/grammarDependencies.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
import { IRawRule } from '../rawGrammar';
|
||||
import { ScopeName } from '../theme';
|
||||
import { IGrammarRepository } from './grammar';
|
||||
export declare type AbsoluteRuleReference = TopLevelRuleReference | TopLevelRepositoryRuleReference;
|
||||
/**
|
||||
* References the top level rule of a grammar with the given scope name.
|
||||
*/
|
||||
export declare class TopLevelRuleReference {
|
||||
readonly scopeName: ScopeName;
|
||||
constructor(scopeName: ScopeName);
|
||||
toKey(): string;
|
||||
}
|
||||
/**
|
||||
* References a rule of a grammar in the top level repository section with the given name.
|
||||
*/
|
||||
export declare class TopLevelRepositoryRuleReference {
|
||||
readonly scopeName: ScopeName;
|
||||
readonly ruleName: string;
|
||||
constructor(scopeName: ScopeName, ruleName: string);
|
||||
toKey(): string;
|
||||
}
|
||||
export declare class ExternalReferenceCollector {
|
||||
private readonly _references;
|
||||
private readonly _seenReferenceKeys;
|
||||
get references(): readonly AbsoluteRuleReference[];
|
||||
readonly visitedRule: Set<IRawRule>;
|
||||
add(reference: AbsoluteRuleReference): void;
|
||||
}
|
||||
export declare class ScopeDependencyProcessor {
|
||||
readonly repo: IGrammarRepository;
|
||||
readonly initialScopeName: ScopeName;
|
||||
readonly seenFullScopeRequests: Set<string>;
|
||||
readonly seenPartialScopeRequests: Set<string>;
|
||||
Q: AbsoluteRuleReference[];
|
||||
constructor(repo: IGrammarRepository, initialScopeName: ScopeName);
|
||||
processQueue(): void;
|
||||
}
|
||||
export declare type IncludeReference = BaseReference | SelfReference | RelativeReference | TopLevelReference | TopLevelRepositoryReference;
|
||||
export declare const enum IncludeReferenceKind {
|
||||
Base = 0,
|
||||
Self = 1,
|
||||
RelativeReference = 2,
|
||||
TopLevelReference = 3,
|
||||
TopLevelRepositoryReference = 4
|
||||
}
|
||||
export declare class BaseReference {
|
||||
readonly kind = IncludeReferenceKind.Base;
|
||||
}
|
||||
export declare class SelfReference {
|
||||
readonly kind = IncludeReferenceKind.Self;
|
||||
}
|
||||
export declare class RelativeReference {
|
||||
readonly ruleName: string;
|
||||
readonly kind = IncludeReferenceKind.RelativeReference;
|
||||
constructor(ruleName: string);
|
||||
}
|
||||
export declare class TopLevelReference {
|
||||
readonly scopeName: ScopeName;
|
||||
readonly kind = IncludeReferenceKind.TopLevelReference;
|
||||
constructor(scopeName: ScopeName);
|
||||
}
|
||||
export declare class TopLevelRepositoryReference {
|
||||
readonly scopeName: ScopeName;
|
||||
readonly ruleName: string;
|
||||
readonly kind = IncludeReferenceKind.TopLevelRepositoryReference;
|
||||
constructor(scopeName: ScopeName, ruleName: string);
|
||||
}
|
||||
export declare function parseInclude(include: string): IncludeReference;
|
1
node_modules/vscode-textmate/release/grammar/index.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/grammar/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export * from './grammar';
|
27
node_modules/vscode-textmate/release/grammar/tokenizeString.d.ts
generated
vendored
Normal file
27
node_modules/vscode-textmate/release/grammar/tokenizeString.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
import type { LineTokens, StateStack } from './grammar';
|
||||
import { OnigString } from '../onigLib';
|
||||
import type { AttributedScopeStack, Grammar } from './grammar';
|
||||
declare class TokenizeStringResult {
|
||||
readonly stack: StateStack;
|
||||
readonly stoppedEarly: boolean;
|
||||
constructor(stack: StateStack, stoppedEarly: boolean);
|
||||
}
|
||||
/**
|
||||
* Tokenize a string
|
||||
* @param grammar
|
||||
* @param lineText
|
||||
* @param isFirstLine
|
||||
* @param linePos
|
||||
* @param stack
|
||||
* @param lineTokens
|
||||
* @param checkWhileConditions
|
||||
* @param timeLimit Use `0` to indicate no time limit
|
||||
* @returns the StackElement or StackElement.TIME_LIMIT_REACHED if the time limit has been reached
|
||||
*/
|
||||
export declare function _tokenizeString(grammar: Grammar, lineText: OnigString, isFirstLine: boolean, linePos: number, stack: StateStack, lineTokens: LineTokens, checkWhileConditions: boolean, timeLimit: number): TokenizeStringResult;
|
||||
export declare class LocalStackElement {
|
||||
readonly scopes: AttributedScopeStack;
|
||||
readonly endPos: number;
|
||||
constructor(scopes: AttributedScopeStack, endPos: number);
|
||||
}
|
||||
export {};
|
6
node_modules/vscode-textmate/release/json.d.ts
generated
vendored
Normal file
6
node_modules/vscode-textmate/release/json.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export interface ILocation {
|
||||
readonly filename: string | null;
|
||||
readonly line: number;
|
||||
readonly char: number;
|
||||
}
|
||||
export declare function parseJSON(source: string, filename: string | null, withMetadata: boolean): any;
|
141
node_modules/vscode-textmate/release/main.d.ts
generated
vendored
Normal file
141
node_modules/vscode-textmate/release/main.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,141 @@
|
|||
import { IOnigLib } from './onigLib';
|
||||
import { IRawGrammar } from './rawGrammar';
|
||||
import { IRawTheme, ScopeName } from './theme';
|
||||
import { StandardTokenType } from './encodedTokenAttributes';
|
||||
export * from './onigLib';
|
||||
export { IRawTheme } from './theme';
|
||||
/**
|
||||
* A registry helper that can locate grammar file paths given scope names.
|
||||
*/
|
||||
export interface RegistryOptions {
|
||||
onigLib: Promise<IOnigLib>;
|
||||
theme?: IRawTheme;
|
||||
colorMap?: string[];
|
||||
loadGrammar(scopeName: ScopeName): Promise<IRawGrammar | undefined | null>;
|
||||
getInjections?(scopeName: ScopeName): ScopeName[] | undefined;
|
||||
}
|
||||
/**
|
||||
* A map from scope name to a language id. Please do not use language id 0.
|
||||
*/
|
||||
export interface IEmbeddedLanguagesMap {
|
||||
[scopeName: string]: number;
|
||||
}
|
||||
/**
|
||||
* A map from selectors to token types.
|
||||
*/
|
||||
export interface ITokenTypeMap {
|
||||
[selector: string]: StandardTokenType;
|
||||
}
|
||||
export interface IGrammarConfiguration {
|
||||
embeddedLanguages?: IEmbeddedLanguagesMap;
|
||||
tokenTypes?: ITokenTypeMap;
|
||||
balancedBracketSelectors?: string[];
|
||||
unbalancedBracketSelectors?: string[];
|
||||
}
|
||||
/**
|
||||
* The registry that will hold all grammars.
|
||||
*/
|
||||
export declare class Registry {
|
||||
private readonly _options;
|
||||
private readonly _syncRegistry;
|
||||
private readonly _ensureGrammarCache;
|
||||
constructor(options: RegistryOptions);
|
||||
dispose(): void;
|
||||
/**
|
||||
* Change the theme. Once called, no previous `ruleStack` should be used anymore.
|
||||
*/
|
||||
setTheme(theme: IRawTheme, colorMap?: string[]): void;
|
||||
/**
|
||||
* Returns a lookup array for color ids.
|
||||
*/
|
||||
getColorMap(): string[];
|
||||
/**
|
||||
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
||||
* Please do not use language id 0.
|
||||
*/
|
||||
loadGrammarWithEmbeddedLanguages(initialScopeName: ScopeName, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap): Promise<IGrammar | null>;
|
||||
/**
|
||||
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
||||
* Please do not use language id 0.
|
||||
*/
|
||||
loadGrammarWithConfiguration(initialScopeName: ScopeName, initialLanguage: number, configuration: IGrammarConfiguration): Promise<IGrammar | null>;
|
||||
/**
|
||||
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
|
||||
*/
|
||||
loadGrammar(initialScopeName: ScopeName): Promise<IGrammar | null>;
|
||||
private _loadGrammar;
|
||||
private _loadSingleGrammar;
|
||||
private _doLoadSingleGrammar;
|
||||
/**
|
||||
* Adds a rawGrammar.
|
||||
*/
|
||||
addGrammar(rawGrammar: IRawGrammar, injections?: string[], initialLanguage?: number, embeddedLanguages?: IEmbeddedLanguagesMap | null): Promise<IGrammar>;
|
||||
/**
|
||||
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.
|
||||
*/
|
||||
private _grammarForScopeName;
|
||||
}
|
||||
/**
|
||||
* A grammar
|
||||
*/
|
||||
export interface IGrammar {
|
||||
/**
|
||||
* Tokenize `lineText` using previous line state `prevState`.
|
||||
*/
|
||||
tokenizeLine(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult;
|
||||
/**
|
||||
* Tokenize `lineText` using previous line state `prevState`.
|
||||
* The result contains the tokens in binary format, resolved with the following information:
|
||||
* - language
|
||||
* - token type (regex, string, comment, other)
|
||||
* - font style
|
||||
* - foreground color
|
||||
* - background color
|
||||
* e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET`
|
||||
*/
|
||||
tokenizeLine2(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult2;
|
||||
}
|
||||
export interface ITokenizeLineResult {
|
||||
readonly tokens: IToken[];
|
||||
/**
|
||||
* The `prevState` to be passed on to the next line tokenization.
|
||||
*/
|
||||
readonly ruleStack: StateStack;
|
||||
/**
|
||||
* Did tokenization stop early due to reaching the time limit.
|
||||
*/
|
||||
readonly stoppedEarly: boolean;
|
||||
}
|
||||
export interface ITokenizeLineResult2 {
|
||||
/**
|
||||
* The tokens in binary format. Each token occupies two array indices. For token i:
|
||||
* - at offset 2*i => startIndex
|
||||
* - at offset 2*i + 1 => metadata
|
||||
*
|
||||
*/
|
||||
readonly tokens: Uint32Array;
|
||||
/**
|
||||
* The `prevState` to be passed on to the next line tokenization.
|
||||
*/
|
||||
readonly ruleStack: StateStack;
|
||||
/**
|
||||
* Did tokenization stop early due to reaching the time limit.
|
||||
*/
|
||||
readonly stoppedEarly: boolean;
|
||||
}
|
||||
export interface IToken {
|
||||
startIndex: number;
|
||||
readonly endIndex: number;
|
||||
readonly scopes: string[];
|
||||
}
|
||||
/**
|
||||
* **IMPORTANT** - Immutable!
|
||||
*/
|
||||
export interface StateStack {
|
||||
_stackElementBrand: void;
|
||||
readonly depth: number;
|
||||
clone(): StateStack;
|
||||
equals(other: StateStack): boolean;
|
||||
}
|
||||
export declare const INITIAL: StateStack;
|
||||
export declare const parseRawGrammar: (content: string, filePath?: string) => IRawGrammar;
|
2
node_modules/vscode-textmate/release/main.js
generated
vendored
Normal file
2
node_modules/vscode-textmate/release/main.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/vscode-textmate/release/main.js.map
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/main.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
node_modules/vscode-textmate/release/matcher.d.ts
generated
vendored
Normal file
8
node_modules/vscode-textmate/release/matcher.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
export interface MatcherWithPriority<T> {
|
||||
matcher: Matcher<T>;
|
||||
priority: -1 | 0 | 1;
|
||||
}
|
||||
export interface Matcher<T> {
|
||||
(matcherInput: T): boolean;
|
||||
}
|
||||
export declare function createMatchers<T>(selector: string, matchesName: (names: string[], matcherInput: T) => boolean): MatcherWithPriority<T>[];
|
42
node_modules/vscode-textmate/release/onigLib.d.ts
generated
vendored
Normal file
42
node_modules/vscode-textmate/release/onigLib.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
import { OrMask } from "./utils";
|
||||
export interface IOnigLib {
|
||||
createOnigScanner(sources: string[]): OnigScanner;
|
||||
createOnigString(str: string): OnigString;
|
||||
}
|
||||
export interface IOnigCaptureIndex {
|
||||
start: number;
|
||||
end: number;
|
||||
length: number;
|
||||
}
|
||||
export interface IOnigMatch {
|
||||
index: number;
|
||||
captureIndices: IOnigCaptureIndex[];
|
||||
}
|
||||
export declare const enum FindOption {
|
||||
None = 0,
|
||||
/**
|
||||
* equivalent of ONIG_OPTION_NOT_BEGIN_STRING: (str) isn't considered as begin of string (* fail \A)
|
||||
*/
|
||||
NotBeginString = 1,
|
||||
/**
|
||||
* equivalent of ONIG_OPTION_NOT_END_STRING: (end) isn't considered as end of string (* fail \z, \Z)
|
||||
*/
|
||||
NotEndString = 2,
|
||||
/**
|
||||
* equivalent of ONIG_OPTION_NOT_BEGIN_POSITION: (start) isn't considered as start position of search (* fail \G)
|
||||
*/
|
||||
NotBeginPosition = 4,
|
||||
/**
|
||||
* used for debugging purposes.
|
||||
*/
|
||||
DebugCall = 8
|
||||
}
|
||||
export interface OnigScanner {
|
||||
findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask<FindOption>): IOnigMatch | null;
|
||||
dispose?(): void;
|
||||
}
|
||||
export interface OnigString {
|
||||
readonly content: string;
|
||||
dispose?(): void;
|
||||
}
|
||||
export declare function disposeOnigString(str: OnigString): void;
|
2
node_modules/vscode-textmate/release/parseRawGrammar.d.ts
generated
vendored
Normal file
2
node_modules/vscode-textmate/release/parseRawGrammar.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
import { IRawGrammar } from './rawGrammar';
|
||||
export declare function parseRawGrammar(content: string, filePath?: string | null): IRawGrammar;
|
5
node_modules/vscode-textmate/release/plist.d.ts
generated
vendored
Normal file
5
node_modules/vscode-textmate/release/plist.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export declare function parseWithLocation(content: string, filename: string | null, locationKeyName: string | null): any;
|
||||
/**
|
||||
* A very fast plist parser
|
||||
*/
|
||||
export declare function parsePLIST(content: string): any;
|
48
node_modules/vscode-textmate/release/rawGrammar.d.ts
generated
vendored
Normal file
48
node_modules/vscode-textmate/release/rawGrammar.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
import { RuleId } from "./rule";
|
||||
export interface ILocation {
|
||||
readonly filename: string;
|
||||
readonly line: number;
|
||||
readonly char: number;
|
||||
}
|
||||
export interface ILocatable {
|
||||
readonly $vscodeTextmateLocation?: ILocation;
|
||||
}
|
||||
export interface IRawGrammar extends ILocatable {
|
||||
repository: IRawRepository;
|
||||
readonly scopeName: string;
|
||||
readonly patterns: IRawRule[];
|
||||
readonly injections?: {
|
||||
[expression: string]: IRawRule;
|
||||
};
|
||||
readonly injectionSelector?: string;
|
||||
readonly fileTypes?: string[];
|
||||
readonly name?: string;
|
||||
readonly firstLineMatch?: string;
|
||||
}
|
||||
export interface IRawRepositoryMap {
|
||||
[name: string]: IRawRule;
|
||||
$self: IRawRule;
|
||||
$base: IRawRule;
|
||||
}
|
||||
export declare type IRawRepository = IRawRepositoryMap & ILocatable;
|
||||
export interface IRawRule extends ILocatable {
|
||||
id?: RuleId;
|
||||
readonly include?: string;
|
||||
readonly name?: string;
|
||||
readonly contentName?: string;
|
||||
readonly match?: string;
|
||||
readonly captures?: IRawCaptures;
|
||||
readonly begin?: string;
|
||||
readonly beginCaptures?: IRawCaptures;
|
||||
readonly end?: string;
|
||||
readonly endCaptures?: IRawCaptures;
|
||||
readonly while?: string;
|
||||
readonly whileCaptures?: IRawCaptures;
|
||||
readonly patterns?: IRawRule[];
|
||||
readonly repository?: IRawRepository;
|
||||
readonly applyEndPatternLast?: boolean;
|
||||
}
|
||||
export interface IRawCapturesMap {
|
||||
[captureId: string]: IRawRule;
|
||||
}
|
||||
export declare type IRawCaptures = IRawCapturesMap & ILocatable;
|
40
node_modules/vscode-textmate/release/registry.d.ts
generated
vendored
Normal file
40
node_modules/vscode-textmate/release/registry.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
import { BalancedBracketSelectors, IGrammarRepository, IThemeProvider } from './grammar';
|
||||
import { IRawGrammar } from './rawGrammar';
|
||||
import { IGrammar, IEmbeddedLanguagesMap, ITokenTypeMap } from './main';
|
||||
import { ScopeStack, Theme, StyleAttributes, ScopeName } from './theme';
|
||||
import { IOnigLib } from './onigLib';
|
||||
export declare class SyncRegistry implements IGrammarRepository, IThemeProvider {
|
||||
private readonly _onigLibPromise;
|
||||
private readonly _grammars;
|
||||
private readonly _rawGrammars;
|
||||
private readonly _injectionGrammars;
|
||||
private _theme;
|
||||
constructor(theme: Theme, _onigLibPromise: Promise<IOnigLib>);
|
||||
dispose(): void;
|
||||
setTheme(theme: Theme): void;
|
||||
getColorMap(): string[];
|
||||
/**
|
||||
* Add `grammar` to registry and return a list of referenced scope names
|
||||
*/
|
||||
addGrammar(grammar: IRawGrammar, injectionScopeNames?: ScopeName[]): void;
|
||||
/**
|
||||
* Lookup a raw grammar.
|
||||
*/
|
||||
lookup(scopeName: ScopeName): IRawGrammar | undefined;
|
||||
/**
|
||||
* Returns the injections for the given grammar
|
||||
*/
|
||||
injections(targetScope: ScopeName): ScopeName[];
|
||||
/**
|
||||
* Get the default theme settings
|
||||
*/
|
||||
getDefaults(): StyleAttributes;
|
||||
/**
|
||||
* Match a scope in the theme.
|
||||
*/
|
||||
themeMatch(scopePath: ScopeStack): StyleAttributes | null;
|
||||
/**
|
||||
* Lookup a grammar.
|
||||
*/
|
||||
grammarForScopeName(scopeName: ScopeName, initialLanguage: number, embeddedLanguages: IEmbeddedLanguagesMap | null, tokenTypes: ITokenTypeMap | null, balancedBracketSelectors: BalancedBracketSelectors | null): Promise<IGrammar | null>;
|
||||
}
|
163
node_modules/vscode-textmate/release/rule.d.ts
generated
vendored
Normal file
163
node_modules/vscode-textmate/release/rule.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
import { OrMask } from './utils';
|
||||
import { IOnigLib, IOnigCaptureIndex, FindOption, OnigString } from './onigLib';
|
||||
import { ILocation, IRawGrammar, IRawRepository, IRawRule } from './rawGrammar';
|
||||
declare const ruleIdSymbol: unique symbol;
|
||||
export declare type RuleId = {
|
||||
__brand: typeof ruleIdSymbol;
|
||||
};
|
||||
export declare const endRuleId = -1;
|
||||
export declare const whileRuleId = -2;
|
||||
export declare function ruleIdFromNumber(id: number): RuleId;
|
||||
export declare function ruleIdToNumber(id: RuleId): number;
|
||||
export interface IRuleRegistry {
|
||||
getRule(ruleId: RuleId): Rule;
|
||||
registerRule<T extends Rule>(factory: (id: RuleId) => T): T;
|
||||
}
|
||||
export interface IGrammarRegistry {
|
||||
getExternalGrammar(scopeName: string, repository: IRawRepository): IRawGrammar | null | undefined;
|
||||
}
|
||||
export interface IRuleFactoryHelper extends IRuleRegistry, IGrammarRegistry {
|
||||
}
|
||||
export declare abstract class Rule {
|
||||
readonly $location: ILocation | undefined;
|
||||
readonly id: RuleId;
|
||||
private readonly _nameIsCapturing;
|
||||
private readonly _name;
|
||||
private readonly _contentNameIsCapturing;
|
||||
private readonly _contentName;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | null | undefined, contentName: string | null | undefined);
|
||||
abstract dispose(): void;
|
||||
get debugName(): string;
|
||||
getName(lineText: string | null, captureIndices: IOnigCaptureIndex[] | null): string | null;
|
||||
getContentName(lineText: string, captureIndices: IOnigCaptureIndex[]): string | null;
|
||||
abstract collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
abstract compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string | null): CompiledRule;
|
||||
abstract compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string | null, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
}
|
||||
export interface ICompilePatternsResult {
|
||||
readonly patterns: RuleId[];
|
||||
readonly hasMissingPatterns: boolean;
|
||||
}
|
||||
export declare class CaptureRule extends Rule {
|
||||
readonly retokenizeCapturedWithRuleId: RuleId | 0;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | null | undefined, contentName: string | null | undefined, retokenizeCapturedWithRuleId: RuleId | 0);
|
||||
dispose(): void;
|
||||
collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string): CompiledRule;
|
||||
compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
}
|
||||
export declare class MatchRule extends Rule {
|
||||
private readonly _match;
|
||||
readonly captures: (CaptureRule | null)[];
|
||||
private _cachedCompiledPatterns;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | undefined, match: string, captures: (CaptureRule | null)[]);
|
||||
dispose(): void;
|
||||
get debugMatchRegExp(): string;
|
||||
collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string): CompiledRule;
|
||||
compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
private _getCachedCompiledPatterns;
|
||||
}
|
||||
export declare class IncludeOnlyRule extends Rule {
|
||||
readonly hasMissingPatterns: boolean;
|
||||
readonly patterns: RuleId[];
|
||||
private _cachedCompiledPatterns;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | null | undefined, contentName: string | null | undefined, patterns: ICompilePatternsResult);
|
||||
dispose(): void;
|
||||
collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string): CompiledRule;
|
||||
compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
private _getCachedCompiledPatterns;
|
||||
}
|
||||
export declare class BeginEndRule extends Rule {
|
||||
private readonly _begin;
|
||||
readonly beginCaptures: (CaptureRule | null)[];
|
||||
private readonly _end;
|
||||
readonly endHasBackReferences: boolean;
|
||||
readonly endCaptures: (CaptureRule | null)[];
|
||||
readonly applyEndPatternLast: boolean;
|
||||
readonly hasMissingPatterns: boolean;
|
||||
readonly patterns: RuleId[];
|
||||
private _cachedCompiledPatterns;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | null | undefined, contentName: string | null | undefined, begin: string, beginCaptures: (CaptureRule | null)[], end: string | undefined, endCaptures: (CaptureRule | null)[], applyEndPatternLast: boolean | undefined, patterns: ICompilePatternsResult);
|
||||
dispose(): void;
|
||||
get debugBeginRegExp(): string;
|
||||
get debugEndRegExp(): string;
|
||||
getEndWithResolvedBackReferences(lineText: string, captureIndices: IOnigCaptureIndex[]): string;
|
||||
collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string): CompiledRule;
|
||||
compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
private _getCachedCompiledPatterns;
|
||||
}
|
||||
export declare class BeginWhileRule extends Rule {
|
||||
private readonly _begin;
|
||||
readonly beginCaptures: (CaptureRule | null)[];
|
||||
readonly whileCaptures: (CaptureRule | null)[];
|
||||
private readonly _while;
|
||||
readonly whileHasBackReferences: boolean;
|
||||
readonly hasMissingPatterns: boolean;
|
||||
readonly patterns: RuleId[];
|
||||
private _cachedCompiledPatterns;
|
||||
private _cachedCompiledWhilePatterns;
|
||||
constructor($location: ILocation | undefined, id: RuleId, name: string | null | undefined, contentName: string | null | undefined, begin: string, beginCaptures: (CaptureRule | null)[], _while: string, whileCaptures: (CaptureRule | null)[], patterns: ICompilePatternsResult);
|
||||
dispose(): void;
|
||||
get debugBeginRegExp(): string;
|
||||
get debugWhileRegExp(): string;
|
||||
getWhileWithResolvedBackReferences(lineText: string, captureIndices: IOnigCaptureIndex[]): string;
|
||||
collectPatterns(grammar: IRuleRegistry, out: RegExpSourceList): void;
|
||||
compile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string): CompiledRule;
|
||||
compileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string, allowA: boolean, allowG: boolean): CompiledRule;
|
||||
private _getCachedCompiledPatterns;
|
||||
compileWhile(grammar: IRuleRegistry & IOnigLib, endRegexSource: string | null): CompiledRule<RuleId | typeof whileRuleId>;
|
||||
compileWhileAG(grammar: IRuleRegistry & IOnigLib, endRegexSource: string | null, allowA: boolean, allowG: boolean): CompiledRule<RuleId | typeof whileRuleId>;
|
||||
private _getCachedCompiledWhilePatterns;
|
||||
}
|
||||
export declare class RuleFactory {
|
||||
static createCaptureRule(helper: IRuleFactoryHelper, $location: ILocation | undefined, name: string | null | undefined, contentName: string | null | undefined, retokenizeCapturedWithRuleId: RuleId | 0): CaptureRule;
|
||||
static getCompiledRuleId(desc: IRawRule, helper: IRuleFactoryHelper, repository: IRawRepository): RuleId;
|
||||
private static _compileCaptures;
|
||||
private static _compilePatterns;
|
||||
}
|
||||
export declare class RegExpSource<TRuleId = RuleId | typeof endRuleId> {
|
||||
source: string;
|
||||
readonly ruleId: TRuleId;
|
||||
hasAnchor: boolean;
|
||||
readonly hasBackReferences: boolean;
|
||||
private _anchorCache;
|
||||
constructor(regExpSource: string, ruleId: TRuleId);
|
||||
clone(): RegExpSource<TRuleId>;
|
||||
setSource(newSource: string): void;
|
||||
resolveBackReferences(lineText: string, captureIndices: IOnigCaptureIndex[]): string;
|
||||
private _buildAnchorCache;
|
||||
resolveAnchors(allowA: boolean, allowG: boolean): string;
|
||||
}
|
||||
export declare class RegExpSourceList<TRuleId = RuleId | typeof endRuleId> {
|
||||
private readonly _items;
|
||||
private _hasAnchors;
|
||||
private _cached;
|
||||
private _anchorCache;
|
||||
constructor();
|
||||
dispose(): void;
|
||||
private _disposeCaches;
|
||||
push(item: RegExpSource<TRuleId>): void;
|
||||
unshift(item: RegExpSource<TRuleId>): void;
|
||||
length(): number;
|
||||
setSource(index: number, newSource: string): void;
|
||||
compile(onigLib: IOnigLib): CompiledRule<TRuleId>;
|
||||
compileAG(onigLib: IOnigLib, allowA: boolean, allowG: boolean): CompiledRule<TRuleId>;
|
||||
private _resolveAnchors;
|
||||
}
|
||||
export declare class CompiledRule<TRuleId = RuleId | typeof endRuleId> {
|
||||
private readonly regExps;
|
||||
private readonly rules;
|
||||
private readonly scanner;
|
||||
constructor(onigLib: IOnigLib, regExps: string[], rules: TRuleId[]);
|
||||
dispose(): void;
|
||||
toString(): string;
|
||||
findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask<FindOption>): IFindNextMatchResult<TRuleId> | null;
|
||||
}
|
||||
export interface IFindNextMatchResult<TRuleId = RuleId | typeof endRuleId> {
|
||||
ruleId: TRuleId;
|
||||
captureIndices: IOnigCaptureIndex[];
|
||||
}
|
||||
export {};
|
5
node_modules/vscode-textmate/release/tests/all.test.d.ts
generated
vendored
Normal file
5
node_modules/vscode-textmate/release/tests/all.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import './grammar.test';
|
||||
import './json.test';
|
||||
import './matcher.test';
|
||||
import './themes.test';
|
||||
import './tokenization.test';
|
1
node_modules/vscode-textmate/release/tests/grammar.test.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/tests/grammar.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
1
node_modules/vscode-textmate/release/tests/inspect.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/tests/inspect.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
1
node_modules/vscode-textmate/release/tests/json.test.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/tests/json.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
1
node_modules/vscode-textmate/release/tests/matcher.test.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/tests/matcher.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
2
node_modules/vscode-textmate/release/tests/onigLibs.d.ts
generated
vendored
Normal file
2
node_modules/vscode-textmate/release/tests/onigLibs.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
import { IOnigLib } from '../onigLib';
|
||||
export declare function getOniguruma(): Promise<IOnigLib>;
|
33
node_modules/vscode-textmate/release/tests/resolver.d.ts
generated
vendored
Normal file
33
node_modules/vscode-textmate/release/tests/resolver.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { IOnigLib } from '../onigLib';
|
||||
import { RegistryOptions } from '../main';
|
||||
import { IRawGrammar } from '../rawGrammar';
|
||||
export interface ILanguageRegistration {
|
||||
id: string;
|
||||
extensions: string[];
|
||||
filenames: string[];
|
||||
}
|
||||
export interface IGrammarRegistration {
|
||||
language: string;
|
||||
scopeName: string;
|
||||
path: string;
|
||||
embeddedLanguages: {
|
||||
[scopeName: string]: string;
|
||||
};
|
||||
grammar?: Promise<IRawGrammar>;
|
||||
}
|
||||
export declare class Resolver implements RegistryOptions {
|
||||
readonly language2id: {
|
||||
[languages: string]: number;
|
||||
};
|
||||
private _lastLanguageId;
|
||||
private _id2language;
|
||||
private readonly _grammars;
|
||||
private readonly _languages;
|
||||
readonly onigLib: Promise<IOnigLib>;
|
||||
constructor(grammars: IGrammarRegistration[], languages: ILanguageRegistration[], onigLibPromise: Promise<IOnigLib>);
|
||||
findLanguageByExtension(fileExtension: string): string | null;
|
||||
findLanguageByFilename(filename: string): string | null;
|
||||
findScopeByFilename(filename: string): string | null;
|
||||
findGrammarByLanguage(language: string): IGrammarRegistration;
|
||||
loadGrammar(scopeName: string): Promise<IRawGrammar | null>;
|
||||
}
|
14
node_modules/vscode-textmate/release/tests/themeTest.d.ts
generated
vendored
Normal file
14
node_modules/vscode-textmate/release/tests/themeTest.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { ThemeData } from './themes.test';
|
||||
import { Resolver } from './resolver';
|
||||
export declare class ThemeTest {
|
||||
private static _readFile;
|
||||
private static _normalizeNewLines;
|
||||
private readonly EXPECTED_FILE_PATH;
|
||||
private readonly tests;
|
||||
readonly expected: string;
|
||||
readonly testName: string;
|
||||
actual: string | null;
|
||||
constructor(THEMES_TEST_PATH: string, testFile: string, themeDatas: ThemeData[], resolver: Resolver);
|
||||
evaluate(): Promise<any>;
|
||||
writeExpected(): void;
|
||||
}
|
6
node_modules/vscode-textmate/release/tests/themedTokenizer.d.ts
generated
vendored
Normal file
6
node_modules/vscode-textmate/release/tests/themedTokenizer.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { IGrammar } from '../main';
|
||||
export interface IThemedToken {
|
||||
content: string;
|
||||
color: string;
|
||||
}
|
||||
export declare function tokenizeWithTheme(colorMap: string[], fileContents: string, grammar: IGrammar): IThemedToken[];
|
7
node_modules/vscode-textmate/release/tests/themes.test.d.ts
generated
vendored
Normal file
7
node_modules/vscode-textmate/release/tests/themes.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { Registry } from '../main';
|
||||
import { IRawTheme } from '../theme';
|
||||
export interface ThemeData {
|
||||
themeName: string;
|
||||
theme: IRawTheme;
|
||||
registry: Registry;
|
||||
}
|
1
node_modules/vscode-textmate/release/tests/tokenization.test.d.ts
generated
vendored
Normal file
1
node_modules/vscode-textmate/release/tests/tokenization.test.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
119
node_modules/vscode-textmate/release/theme.d.ts
generated
vendored
Normal file
119
node_modules/vscode-textmate/release/theme.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
import { OrMask } from './utils';
|
||||
export declare class Theme {
|
||||
private readonly _colorMap;
|
||||
private readonly _defaults;
|
||||
private readonly _root;
|
||||
static createFromRawTheme(source: IRawTheme | undefined, colorMap?: string[]): Theme;
|
||||
static createFromParsedTheme(source: ParsedThemeRule[], colorMap?: string[]): Theme;
|
||||
private readonly _cachedMatchRoot;
|
||||
constructor(_colorMap: ColorMap, _defaults: StyleAttributes, _root: ThemeTrieElement);
|
||||
getColorMap(): string[];
|
||||
getDefaults(): StyleAttributes;
|
||||
match(scopePath: ScopeStack | null): StyleAttributes | null;
|
||||
}
|
||||
/**
|
||||
* Identifiers with a binary dot operator.
|
||||
* Examples: `baz` or `foo.bar`
|
||||
*/
|
||||
export declare type ScopeName = string;
|
||||
/**
|
||||
* An expression language of ScopeNames with a binary space (to indicate nesting) operator.
|
||||
* Examples: `foo.bar boo.baz`
|
||||
*/
|
||||
export declare type ScopePath = string;
|
||||
/**
|
||||
* An expression language of ScopePathStr with a binary comma (to indicate alternatives) operator.
|
||||
* Examples: `foo.bar boo.baz,quick quack`
|
||||
*/
|
||||
export declare type ScopePattern = string;
|
||||
/**
|
||||
* A TextMate theme.
|
||||
*/
|
||||
export interface IRawTheme {
|
||||
readonly name?: string;
|
||||
readonly settings: IRawThemeSetting[];
|
||||
}
|
||||
/**
|
||||
* A single theme setting.
|
||||
*/
|
||||
export interface IRawThemeSetting {
|
||||
readonly name?: string;
|
||||
readonly scope?: ScopePattern | ScopePattern[];
|
||||
readonly settings: {
|
||||
readonly fontStyle?: string;
|
||||
readonly foreground?: string;
|
||||
readonly background?: string;
|
||||
};
|
||||
}
|
||||
export declare class ScopeStack {
|
||||
readonly parent: ScopeStack | null;
|
||||
readonly scopeName: ScopeName;
|
||||
static from(first: ScopeName, ...segments: ScopeName[]): ScopeStack;
|
||||
static from(...segments: ScopeName[]): ScopeStack | null;
|
||||
constructor(parent: ScopeStack | null, scopeName: ScopeName);
|
||||
push(scopeName: ScopeName): ScopeStack;
|
||||
getSegments(): ScopeName[];
|
||||
toString(): string;
|
||||
}
|
||||
export declare class StyleAttributes {
|
||||
readonly fontStyle: OrMask<FontStyle>;
|
||||
readonly foregroundId: number;
|
||||
readonly backgroundId: number;
|
||||
constructor(fontStyle: OrMask<FontStyle>, foregroundId: number, backgroundId: number);
|
||||
}
|
||||
/**
|
||||
* Parse a raw theme into rules.
|
||||
*/
|
||||
export declare function parseTheme(source: IRawTheme | undefined): ParsedThemeRule[];
|
||||
export declare class ParsedThemeRule {
|
||||
readonly scope: ScopeName;
|
||||
readonly parentScopes: ScopeName[] | null;
|
||||
readonly index: number;
|
||||
readonly fontStyle: OrMask<FontStyle>;
|
||||
readonly foreground: string | null;
|
||||
readonly background: string | null;
|
||||
constructor(scope: ScopeName, parentScopes: ScopeName[] | null, index: number, fontStyle: OrMask<FontStyle>, foreground: string | null, background: string | null);
|
||||
}
|
||||
export declare const enum FontStyle {
|
||||
NotSet = -1,
|
||||
None = 0,
|
||||
Italic = 1,
|
||||
Bold = 2,
|
||||
Underline = 4,
|
||||
Strikethrough = 8
|
||||
}
|
||||
export declare function fontStyleToString(fontStyle: OrMask<FontStyle>): string;
|
||||
export declare class ColorMap {
|
||||
private readonly _isFrozen;
|
||||
private _lastColorId;
|
||||
private _id2color;
|
||||
private _color2id;
|
||||
constructor(_colorMap?: string[]);
|
||||
getId(color: string | null): number;
|
||||
getColorMap(): string[];
|
||||
}
|
||||
export declare class ThemeTrieElementRule {
|
||||
scopeDepth: number;
|
||||
parentScopes: ScopeName[] | null;
|
||||
fontStyle: number;
|
||||
foreground: number;
|
||||
background: number;
|
||||
constructor(scopeDepth: number, parentScopes: ScopeName[] | null, fontStyle: number, foreground: number, background: number);
|
||||
clone(): ThemeTrieElementRule;
|
||||
static cloneArr(arr: ThemeTrieElementRule[]): ThemeTrieElementRule[];
|
||||
acceptOverwrite(scopeDepth: number, fontStyle: number, foreground: number, background: number): void;
|
||||
}
|
||||
export interface ITrieChildrenMap {
|
||||
[segment: string]: ThemeTrieElement;
|
||||
}
|
||||
export declare class ThemeTrieElement {
|
||||
private readonly _mainRule;
|
||||
private readonly _children;
|
||||
private readonly _rulesWithParentScopes;
|
||||
constructor(_mainRule: ThemeTrieElementRule, rulesWithParentScopes?: ThemeTrieElementRule[], _children?: ITrieChildrenMap);
|
||||
private static _sortBySpecificity;
|
||||
private static _cmpBySpecificity;
|
||||
match(scope: ScopeName): ThemeTrieElementRule[];
|
||||
insert(scopeDepth: number, scope: ScopeName, parentScopes: ScopeName[] | null, fontStyle: number, foreground: number, background: number): void;
|
||||
private _doInsertHere;
|
||||
}
|
26
node_modules/vscode-textmate/release/utils.d.ts
generated
vendored
Normal file
26
node_modules/vscode-textmate/release/utils.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { IOnigCaptureIndex } from './onigLib';
|
||||
export declare function clone<T>(something: T): T;
|
||||
export declare function mergeObjects(target: any, ...sources: any[]): any;
|
||||
export declare function basename(path: string): string;
|
||||
export declare class RegexSource {
|
||||
static hasCaptures(regexSource: string | null): boolean;
|
||||
static replaceCaptures(regexSource: string, captureSource: string, captureIndices: IOnigCaptureIndex[]): string;
|
||||
}
|
||||
/**
|
||||
* A union of given const enum values.
|
||||
*/
|
||||
export declare type OrMask<T extends number> = number;
|
||||
export declare function strcmp(a: string, b: string): number;
|
||||
export declare function strArrCmp(a: string[] | null, b: string[] | null): number;
|
||||
export declare function isValidHexColor(hex: string): boolean;
|
||||
/**
|
||||
* Escapes regular expression characters in a given string
|
||||
*/
|
||||
export declare function escapeRegExpCharacters(value: string): string;
|
||||
export declare class CachedFn<TKey, TValue> {
|
||||
private readonly fn;
|
||||
private readonly cache;
|
||||
constructor(fn: (key: TKey) => TValue);
|
||||
get(key: TKey): TValue;
|
||||
}
|
||||
export declare const performanceNow: () => number;
|
Loading…
Add table
Add a link
Reference in a new issue