Astro+Directus(Visual-Editing)+Snipcart Test-Stack
This commit is contained in:
commit
1459e99cb0
10119 files changed
+1499318
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Pine Wu
|
||||
Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
|
||||
|
||||
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.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
# @shikijs/core
|
||||
|
||||
The core functionality of [Shiki](https://github.com/shikijs/shiki), without any grammar of themes bundled.
|
||||
|
||||
It's the same as importing `shiki/core`.
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
import { HighlighterGeneric, Awaitable, CodeToHastOptions, CodeToTokensOptions, TokensResult, RequireKeys, CodeToTokensBaseOptions, ThemedToken, CodeToTokensWithThemesOptions, ThemedTokenWithVariants, BundledHighlighterOptions, GrammarState, CreateBundledHighlighterOptions, CreateHighlighterFactory, HighlighterCoreOptions, HighlighterCore, ShikiInternal, ShikiTransformerContextCommon, CodeToHastRenderOptions, ShikiTransformerContextSource, ThemeRegistrationResolved, TokenizeWithThemeOptions, Grammar, ThemeRegistrationAny, ThemeRegistration, ShikiTransformer, ThemeInput, PlainTextLanguage, SpecialLanguage, SpecialTheme, MaybeGetter, MaybeArray, Position, CodeOptionsMultipleThemes, TokenStyles } from '@shikijs/types';
|
||||
export * from '@shikijs/types';
|
||||
import { Root, Element } from 'hast';
|
||||
import { toHtml } from 'hast-util-to-html';
|
||||
|
||||
/**
|
||||
* Create a `createHighlighter` function with bundled themes, languages, and engine.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const createHighlighter = createBundledHighlighter({
|
||||
* langs: {
|
||||
* typescript: () => import('@shikijs/langs/typescript'),
|
||||
* // ...
|
||||
* },
|
||||
* themes: {
|
||||
* nord: () => import('@shikijs/themes/nord'),
|
||||
* // ...
|
||||
* },
|
||||
* engine: () => createOnigurumaEngine(), // or createJavaScriptRegexEngine()
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
declare function createBundledHighlighter<BundledLangs extends string, BundledThemes extends string>(options: CreateBundledHighlighterOptions<BundledLangs, BundledThemes>): CreateHighlighterFactory<BundledLangs, BundledThemes>;
|
||||
interface ShorthandsBundle<L extends string, T extends string> {
|
||||
/**
|
||||
* Shorthand for `codeToHtml` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*
|
||||
* Differences from `highlighter.codeToHtml()`, this function is async.
|
||||
*/
|
||||
codeToHtml: (code: string, options: CodeToHastOptions<L, T>) => Promise<string>;
|
||||
/**
|
||||
* Shorthand for `codeToHtml` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*
|
||||
* Differences from `highlighter.codeToHtml()`, this function is async.
|
||||
*/
|
||||
codeToHast: (code: string, options: CodeToHastOptions<L, T>) => Promise<Root>;
|
||||
/**
|
||||
* Shorthand for `codeToTokens` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*
|
||||
* Differences from `highlighter.codeToTokens()`, this function is async.
|
||||
*/
|
||||
codeToTokens: (code: string, options: CodeToTokensOptions<L, T>) => Promise<TokensResult>;
|
||||
/**
|
||||
* Shorthand for `codeToTokensBase` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*
|
||||
* Differences from `highlighter.codeToTokensBase()`, this function is async.
|
||||
*/
|
||||
codeToTokensBase: (code: string, options: RequireKeys<CodeToTokensBaseOptions<L, T>, 'theme' | 'lang'>) => Promise<ThemedToken[][]>;
|
||||
/**
|
||||
* Shorthand for `codeToTokensWithThemes` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*
|
||||
* Differences from `highlighter.codeToTokensWithThemes()`, this function is async.
|
||||
*/
|
||||
codeToTokensWithThemes: (code: string, options: RequireKeys<CodeToTokensWithThemesOptions<L, T>, 'themes' | 'lang'>) => Promise<ThemedTokenWithVariants[][]>;
|
||||
/**
|
||||
* Get the singleton highlighter.
|
||||
*/
|
||||
getSingletonHighlighter: (options?: Partial<BundledHighlighterOptions<L, T>>) => Promise<HighlighterGeneric<L, T>>;
|
||||
/**
|
||||
* Shorthand for `getLastGrammarState` with auto-loaded theme and language.
|
||||
* A singleton highlighter it maintained internally.
|
||||
*/
|
||||
getLastGrammarState: ((element: ThemedToken[][] | Root) => GrammarState) | ((code: string, options: CodeToTokensBaseOptions<L, T>) => Promise<GrammarState>);
|
||||
}
|
||||
declare function makeSingletonHighlighter<L extends string, T extends string>(createHighlighter: CreateHighlighterFactory<L, T>): (options?: Partial<BundledHighlighterOptions<L, T>>) => Promise<HighlighterGeneric<L, T>>;
|
||||
interface CreateSingletonShorthandsOptions<L extends string, T extends string> {
|
||||
/**
|
||||
* A custom function to guess embedded languages to be loaded.
|
||||
*/
|
||||
guessEmbeddedLanguages?: (code: string, lang: string | undefined, highlighter: HighlighterGeneric<L, T>) => Awaitable<string[] | undefined>;
|
||||
}
|
||||
declare function createSingletonShorthands<L extends string, T extends string>(createHighlighter: CreateHighlighterFactory<L, T>, config?: CreateSingletonShorthandsOptions<L, T>): ShorthandsBundle<L, T>;
|
||||
/**
|
||||
* @deprecated Use `createBundledHighlighter` instead.
|
||||
*/
|
||||
declare const createdBundledHighlighter: typeof createBundledHighlighter;
|
||||
|
||||
/**
|
||||
* Create a Shiki core highlighter instance, with no languages or themes bundled.
|
||||
* Wasm and each language and theme must be loaded manually.
|
||||
*
|
||||
* @see http://shiki.style/guide/bundles#fine-grained-bundle
|
||||
*/
|
||||
declare function createHighlighterCore(options: HighlighterCoreOptions<false>): Promise<HighlighterCore>;
|
||||
/**
|
||||
* Create a Shiki core highlighter instance, with no languages or themes bundled.
|
||||
* Wasm and each language and theme must be loaded manually.
|
||||
*
|
||||
* Synchronous version of `createHighlighterCore`, which requires to provide the engine and all themes and languages upfront.
|
||||
*
|
||||
* @see http://shiki.style/guide/bundles#fine-grained-bundle
|
||||
*/
|
||||
declare function createHighlighterCoreSync(options: HighlighterCoreOptions<true>): HighlighterCore;
|
||||
declare function makeSingletonHighlighterCore(createHighlighter: typeof createHighlighterCore): (options: HighlighterCoreOptions) => Promise<HighlighterCore>;
|
||||
declare const getSingletonHighlighterCore: (options: HighlighterCoreOptions) => Promise<HighlighterCore>;
|
||||
|
||||
/**
|
||||
* Get the minimal shiki context for rendering.
|
||||
*/
|
||||
declare function createShikiInternal(options: HighlighterCoreOptions): Promise<ShikiInternal>;
|
||||
|
||||
/**
|
||||
* Get the minimal shiki context for rendering.
|
||||
*
|
||||
* Synchronous version of `createShikiInternal`, which requires to provide the engine and all themes and languages upfront.
|
||||
*/
|
||||
declare function createShikiInternalSync(options: HighlighterCoreOptions<true>): ShikiInternal;
|
||||
|
||||
declare function codeToHast(internal: ShikiInternal, code: string, options: CodeToHastOptions, transformerContext?: ShikiTransformerContextCommon): Root;
|
||||
declare function tokensToHast(tokens: ThemedToken[][], options: CodeToHastRenderOptions, transformerContext: ShikiTransformerContextSource, grammarState?: GrammarState | undefined): Root;
|
||||
|
||||
declare const hastToHtml: typeof toHtml;
|
||||
/**
|
||||
* Get highlighted code in HTML.
|
||||
*/
|
||||
declare function codeToHtml(internal: ShikiInternal, code: string, options: CodeToHastOptions): string;
|
||||
|
||||
/**
|
||||
* High-level code-to-tokens API.
|
||||
*
|
||||
* It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.
|
||||
*/
|
||||
declare function codeToTokens(internal: ShikiInternal, code: string, options: CodeToTokensOptions): TokensResult;
|
||||
|
||||
declare function tokenizeAnsiWithTheme(theme: ThemeRegistrationResolved, fileContents: string, options?: TokenizeWithThemeOptions): ThemedToken[][];
|
||||
|
||||
/**
|
||||
* Code to tokens, with a simple theme.
|
||||
*/
|
||||
declare function codeToTokensBase(internal: ShikiInternal, code: string, options?: CodeToTokensBaseOptions): ThemedToken[][];
|
||||
declare function tokenizeWithTheme(code: string, grammar: Grammar, theme: ThemeRegistrationResolved, colorMap: string[], options: TokenizeWithThemeOptions): ThemedToken[][];
|
||||
|
||||
/**
|
||||
* Get tokens with multiple themes
|
||||
*/
|
||||
declare function codeToTokensWithThemes(internal: ShikiInternal, code: string, options: CodeToTokensWithThemesOptions): ThemedTokenWithVariants[][];
|
||||
|
||||
/**
|
||||
* Normalize a textmate theme to shiki theme
|
||||
*/
|
||||
declare function normalizeTheme(rawTheme: ThemeRegistrationAny): ThemeRegistrationResolved;
|
||||
|
||||
interface CssVariablesThemeOptions {
|
||||
/**
|
||||
* Theme name. Need to unique if multiple css variables themes are created
|
||||
*
|
||||
* @default 'css-variables'
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Prefix for css variables
|
||||
*
|
||||
* @default '--shiki-'
|
||||
*/
|
||||
variablePrefix?: string;
|
||||
/**
|
||||
* Default value for css variables, the key is without the prefix
|
||||
*
|
||||
* @example `{ 'token-comment': '#888' }` will generate `var(--shiki-token-comment, #888)` for comments
|
||||
*/
|
||||
variableDefaults?: Record<string, string>;
|
||||
/**
|
||||
* Enable font style
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
fontStyle?: boolean;
|
||||
}
|
||||
/**
|
||||
* A factory function to create a css-variable-based theme
|
||||
*
|
||||
* @see https://shiki.style/guide/theme-colors#css-variables-theme
|
||||
*/
|
||||
declare function createCssVariablesTheme(options?: CssVariablesThemeOptions): ThemeRegistration;
|
||||
|
||||
/**
|
||||
* A built-in transformer to add decorations to the highlighted code.
|
||||
*/
|
||||
declare function transformerDecorations(): ShikiTransformer;
|
||||
|
||||
declare function resolveColorReplacements(theme: ThemeRegistrationAny | string, options?: TokenizeWithThemeOptions): Record<string, string | undefined>;
|
||||
declare function applyColorReplacements(color: string, replacements?: Record<string, string | undefined>): string;
|
||||
declare function applyColorReplacements(color?: string | undefined, replacements?: Record<string, string | undefined>): string | undefined;
|
||||
|
||||
declare function toArray<T>(x: MaybeArray<T>): T[];
|
||||
/**
|
||||
* Normalize a getter to a promise.
|
||||
*/
|
||||
declare function normalizeGetter<T>(p: MaybeGetter<T>): Promise<T>;
|
||||
/**
|
||||
* Check if the language is plaintext that is ignored by Shiki.
|
||||
*
|
||||
* Hard-coded plain text languages: `plaintext`, `txt`, `text`, `plain`.
|
||||
*/
|
||||
declare function isPlainLang(lang: string | null | undefined): lang is PlainTextLanguage;
|
||||
/**
|
||||
* Check if the language is specially handled or bypassed by Shiki.
|
||||
*
|
||||
* Hard-coded languages: `ansi` and plaintexts like `plaintext`, `txt`, `text`, `plain`.
|
||||
*/
|
||||
declare function isSpecialLang(lang: any): lang is SpecialLanguage;
|
||||
/**
|
||||
* Check if the theme is specially handled or bypassed by Shiki.
|
||||
*
|
||||
* Hard-coded themes: `none`.
|
||||
*/
|
||||
declare function isNoneTheme(theme: string | ThemeInput | null | undefined): theme is 'none';
|
||||
/**
|
||||
* Check if the theme is specially handled or bypassed by Shiki.
|
||||
*
|
||||
* Hard-coded themes: `none`.
|
||||
*/
|
||||
declare function isSpecialTheme(theme: string | ThemeInput | null | undefined): theme is SpecialTheme;
|
||||
|
||||
/**
|
||||
* Utility to append class to a hast node
|
||||
*
|
||||
* If the `property.class` is a string, it will be splitted by space and converted to an array.
|
||||
*/
|
||||
declare function addClassToHast(node: Element, className: string | string[]): Element;
|
||||
|
||||
/**
|
||||
* Split a string into lines, each line preserves the line ending.
|
||||
*
|
||||
* @param code - The code string to split into lines
|
||||
* @param preserveEnding - Whether to preserve line endings in the result
|
||||
* @returns Array of tuples containing [line content, offset index]
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* splitLines('hello\nworld', false)
|
||||
* // => [['hello', 0], ['world', 6]]
|
||||
*
|
||||
* splitLines('hello\nworld', true)
|
||||
* // => [['hello\n', 0], ['world', 6]]
|
||||
* ```
|
||||
*/
|
||||
declare function splitLines(code: string, preserveEnding?: boolean): [string, number][];
|
||||
/**
|
||||
* Creates a converter between index and position in a code block.
|
||||
*
|
||||
* Overflow/underflow are unchecked.
|
||||
*/
|
||||
declare function createPositionConverter(code: string): {
|
||||
lines: string[];
|
||||
indexToPos: (index: number) => Position;
|
||||
posToIndex: (line: number, character: number) => number;
|
||||
};
|
||||
/**
|
||||
* Guess embedded languages from given code and highlighter.
|
||||
*
|
||||
* When highlighter is provided, only bundled languages will be included.
|
||||
*
|
||||
* @param code - The code string to analyze
|
||||
* @param _lang - The primary language of the code (currently unused)
|
||||
* @param highlighter - Optional highlighter instance to validate languages
|
||||
* @returns Array of detected language identifiers
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* // Detects 'javascript' from Vue SFC
|
||||
* guessEmbeddedLanguages('<script lang="javascript">')
|
||||
*
|
||||
* // Detects 'python' from markdown code block
|
||||
* guessEmbeddedLanguages('```python\nprint("hi")\n```')
|
||||
* ```
|
||||
*/
|
||||
declare function guessEmbeddedLanguages(code: string, _lang: string | undefined, highlighter?: HighlighterGeneric<any, any>): string[];
|
||||
|
||||
/**
|
||||
* Split a token into multiple tokens by given offsets.
|
||||
*
|
||||
* The offsets are relative to the token, and should be sorted.
|
||||
*/
|
||||
declare function splitToken<T extends Pick<ThemedToken, 'content' | 'offset'>>(token: T, offsets: number[]): T[];
|
||||
/**
|
||||
* Split 2D tokens array by given breakpoints.
|
||||
*/
|
||||
declare function splitTokens<T extends Pick<ThemedToken, 'content' | 'offset'>>(tokens: T[][], breakpoints: number[] | Set<number>): T[][];
|
||||
declare function flatTokenVariants(merged: ThemedTokenWithVariants, variantsOrder: string[], cssVariablePrefix: string, defaultColor: CodeOptionsMultipleThemes['defaultColor'], colorsRendering?: CodeOptionsMultipleThemes['colorsRendering']): ThemedToken;
|
||||
declare function getTokenStyleObject(token: TokenStyles): Record<string, string>;
|
||||
declare function stringifyTokenStyle(token: string | Record<string, string>): string;
|
||||
|
||||
type DeprecationTarget = 3;
|
||||
/**
|
||||
* Enable runtime warning for deprecated APIs, for the future versions of Shiki.
|
||||
*
|
||||
* You can pass a major version to only warn for deprecations that will be removed in that version.
|
||||
*
|
||||
* By default, deprecation warning is set to 3 since Shiki v2.0.0
|
||||
*/
|
||||
declare function enableDeprecationWarnings(emitDeprecation?: DeprecationTarget | boolean, emitError?: boolean): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare function warnDeprecated(message: string, version?: DeprecationTarget): void;
|
||||
|
||||
export { addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createBundledHighlighter, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createdBundledHighlighter, enableDeprecationWarnings, flatTokenVariants, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
|
||||
export type { CreateSingletonShorthandsOptions, CssVariablesThemeOptions, ShorthandsBundle };
|
||||
+2446
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
export * from '@shikijs/vscode-textmate';
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from '@shikijs/vscode-textmate';
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export * from '@shikijs/types';
|
||||
import '@shikijs/vscode-textmate';
|
||||
+1
@@ -0,0 +1 @@
|
||||
export * from '@shikijs/types';
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "@shikijs/core",
|
||||
"type": "module",
|
||||
"version": "3.23.0",
|
||||
"description": "Core of Shiki",
|
||||
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/shikijs/shiki#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/shikijs/shiki.git",
|
||||
"directory": "packages/core"
|
||||
},
|
||||
"bugs": "https://github.com/shikijs/shiki/issues",
|
||||
"keywords": [
|
||||
"shiki"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": "./dist/index.mjs",
|
||||
"./textmate": {
|
||||
"types": "./dist/textmate.d.mts",
|
||||
"default": "./dist/textmate.mjs"
|
||||
},
|
||||
"./types": {
|
||||
"types": "./dist/types.d.mts"
|
||||
},
|
||||
"./dist/*": "./dist/*",
|
||||
"./package.json": "./package.json",
|
||||
"./*": "./dist/*"
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"types": [
|
||||
"./dist/types.d.mts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@shikijs/vscode-textmate": "^10.0.2",
|
||||
"@types/hast": "^3.0.4",
|
||||
"hast-util-to-html": "^9.0.5",
|
||||
"@shikijs/types": "3.23.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "unbuild --stub",
|
||||
"test": "vitest"
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Pine Wu
|
||||
Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
|
||||
|
||||
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.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# @shikijs/engine-javascript
|
||||
|
||||
Engine for Shiki using JavaScript's native RegExp. Uses [Oniguruma-To-ES](https://github.com/slevithan/oniguruma-to-es) to transpile regex syntax and behavior.
|
||||
|
||||
[Documentation](https://shiki.style/guide/regex-engines)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import '@shikijs/types';
|
||||
import 'oniguruma-to-es';
|
||||
export { J as JavaScriptRegexEngineOptions, c as createJavaScriptRegexEngine, d as defaultJavaScriptRegexConstructor } from './shared/engine-javascript.CDEDnU-m.mjs';
|
||||
import '@shikijs/vscode-textmate';
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
import { toRegExp } from 'oniguruma-to-es';
|
||||
import { J as JavaScriptScanner } from './shared/engine-javascript.hzpS1_41.mjs';
|
||||
|
||||
function defaultJavaScriptRegexConstructor(pattern, options) {
|
||||
return toRegExp(
|
||||
pattern,
|
||||
{
|
||||
global: true,
|
||||
hasIndices: true,
|
||||
// This has no benefit for the standard JS engine, but it avoids a perf penalty for
|
||||
// precompiled grammars when constructing extremely long patterns that aren't always used
|
||||
lazyCompileLength: 3e3,
|
||||
rules: {
|
||||
// Needed since TextMate grammars merge backrefs across patterns
|
||||
allowOrphanBackrefs: true,
|
||||
// Improves search performance for generated regexes
|
||||
asciiWordBoundaries: true,
|
||||
// Follow `vscode-oniguruma` which enables this Oniguruma option by default
|
||||
captureGroup: true,
|
||||
// Oniguruma uses depth limit `20`; lowered here to keep regexes shorter and maybe
|
||||
// sometimes faster, but can be increased if issues reported due to low limit
|
||||
recursionLimit: 5,
|
||||
// Oniguruma option for `^`->`\A`, `$`->`\Z`; improves search performance without any
|
||||
// change in meaning since TM grammars search line by line
|
||||
singleline: true
|
||||
},
|
||||
...options
|
||||
}
|
||||
);
|
||||
}
|
||||
function createJavaScriptRegexEngine(options = {}) {
|
||||
const _options = Object.assign(
|
||||
{
|
||||
target: "auto",
|
||||
cache: /* @__PURE__ */ new Map()
|
||||
},
|
||||
options
|
||||
);
|
||||
_options.regexConstructor ||= (pattern) => defaultJavaScriptRegexConstructor(pattern, { target: _options.target });
|
||||
return {
|
||||
createScanner(patterns) {
|
||||
return new JavaScriptScanner(patterns, _options);
|
||||
},
|
||||
createString(s) {
|
||||
return {
|
||||
content: s
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor };
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { RegexEngine } from '@shikijs/types';
|
||||
|
||||
/**
|
||||
* Raw JavaScript regex engine that only supports precompiled grammars.
|
||||
*
|
||||
* This further simplifies the engine by excluding the regex compilation step.
|
||||
*
|
||||
* Zero dependencies.
|
||||
*/
|
||||
declare function createJavaScriptRawEngine(): RegexEngine;
|
||||
|
||||
export { createJavaScriptRawEngine };
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
import { J as JavaScriptScanner } from './shared/engine-javascript.hzpS1_41.mjs';
|
||||
|
||||
function createJavaScriptRawEngine() {
|
||||
const options = {
|
||||
cache: /* @__PURE__ */ new Map(),
|
||||
regexConstructor: () => {
|
||||
throw new Error("JavaScriptRawEngine: only support precompiled grammar");
|
||||
}
|
||||
};
|
||||
return {
|
||||
createScanner(patterns) {
|
||||
return new JavaScriptScanner(patterns, options);
|
||||
},
|
||||
createString(s) {
|
||||
return {
|
||||
content: s
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { createJavaScriptRawEngine };
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export { J as JavaScriptRegexEngineOptions, a as JavaScriptRegexScannerOptions, b as JavaScriptScanner, c as createJavaScriptRegexEngine, d as defaultJavaScriptRegexConstructor } from './shared/engine-javascript.CDEDnU-m.mjs';
|
||||
export { createJavaScriptRawEngine } from './engine-raw.mjs';
|
||||
import '@shikijs/types';
|
||||
import 'oniguruma-to-es';
|
||||
import '@shikijs/vscode-textmate';
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from './engine-compile.mjs';
|
||||
export { createJavaScriptRawEngine } from './engine-raw.mjs';
|
||||
export { J as JavaScriptScanner } from './shared/engine-javascript.hzpS1_41.mjs';
|
||||
import 'oniguruma-to-es';
|
||||
Generated
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
import { PatternScanner, RegexEngineString, RegexEngine } from '@shikijs/types';
|
||||
import { ToRegExpOptions } from 'oniguruma-to-es';
|
||||
import { IOnigMatch } from '@shikijs/vscode-textmate';
|
||||
|
||||
interface JavaScriptRegexScannerOptions {
|
||||
/**
|
||||
* Whether to allow invalid regex patterns.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
forgiving?: boolean;
|
||||
/**
|
||||
* Cache for regex patterns.
|
||||
*/
|
||||
cache?: Map<string, RegExp | Error> | null;
|
||||
/**
|
||||
* Custom pattern to RegExp constructor.
|
||||
*
|
||||
* By default `oniguruma-to-es` is used.
|
||||
*/
|
||||
regexConstructor?: (pattern: string) => RegExp;
|
||||
}
|
||||
declare class JavaScriptScanner implements PatternScanner {
|
||||
patterns: (string | RegExp)[];
|
||||
options: JavaScriptRegexScannerOptions;
|
||||
regexps: (RegExp | null)[];
|
||||
constructor(patterns: (string | RegExp)[], options?: JavaScriptRegexScannerOptions);
|
||||
findNextMatchSync(string: string | RegexEngineString, startPosition: number, _options: number): IOnigMatch | null;
|
||||
}
|
||||
|
||||
interface JavaScriptRegexEngineOptions extends JavaScriptRegexScannerOptions {
|
||||
/**
|
||||
* The target ECMAScript version.
|
||||
*
|
||||
* Oniguruma-To-ES uses RegExp features from later versions of ECMAScript to add support for a
|
||||
* few more grammars. If using target `ES2024` or later, the RegExp `v` flag is used which
|
||||
* requires Node.js 20+ or Chrome 112+.
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicodeSets
|
||||
*
|
||||
* For maximum compatibility, you can set it to `ES2018` which uses the RegExp `u` flag.
|
||||
*
|
||||
* Set to `auto` to automatically detect the latest version supported by the environment.
|
||||
*
|
||||
* @default 'auto'
|
||||
*/
|
||||
target?: 'auto' | 'ES2025' | 'ES2024' | 'ES2018';
|
||||
}
|
||||
/**
|
||||
* The default regex constructor for the JavaScript RegExp engine.
|
||||
*/
|
||||
declare function defaultJavaScriptRegexConstructor(pattern: string, options?: ToRegExpOptions): RegExp;
|
||||
/**
|
||||
* Use the modern JavaScript RegExp engine to implement the OnigScanner.
|
||||
*
|
||||
* As Oniguruma supports some features that can't be emulated using native JavaScript regexes, some
|
||||
* patterns are not supported. Errors will be thrown when parsing TextMate grammars with
|
||||
* unsupported patterns, and when the grammar includes patterns that use invalid Oniguruma syntax.
|
||||
* Set `forgiving` to `true` to ignore these errors and skip any unsupported or invalid patterns.
|
||||
*/
|
||||
declare function createJavaScriptRegexEngine(options?: JavaScriptRegexEngineOptions): RegexEngine;
|
||||
|
||||
export { JavaScriptScanner as b, createJavaScriptRegexEngine as c, defaultJavaScriptRegexConstructor as d };
|
||||
export type { JavaScriptRegexEngineOptions as J, JavaScriptRegexScannerOptions as a };
|
||||
Generated
Vendored
+93
@@ -0,0 +1,93 @@
|
||||
const MAX = 4294967295;
|
||||
class JavaScriptScanner {
|
||||
constructor(patterns, options = {}) {
|
||||
this.patterns = patterns;
|
||||
this.options = options;
|
||||
const {
|
||||
forgiving = false,
|
||||
cache,
|
||||
regexConstructor
|
||||
} = options;
|
||||
if (!regexConstructor) {
|
||||
throw new Error("Option `regexConstructor` is not provided");
|
||||
}
|
||||
this.regexps = patterns.map((p) => {
|
||||
if (typeof p !== "string") {
|
||||
return p;
|
||||
}
|
||||
const cached = cache?.get(p);
|
||||
if (cached) {
|
||||
if (cached instanceof RegExp) {
|
||||
return cached;
|
||||
}
|
||||
if (forgiving)
|
||||
return null;
|
||||
throw cached;
|
||||
}
|
||||
try {
|
||||
const regex = regexConstructor(p);
|
||||
cache?.set(p, regex);
|
||||
return regex;
|
||||
} catch (e) {
|
||||
cache?.set(p, e);
|
||||
if (forgiving)
|
||||
return null;
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
}
|
||||
regexps;
|
||||
findNextMatchSync(string, startPosition, _options) {
|
||||
const str = typeof string === "string" ? string : string.content;
|
||||
const pending = [];
|
||||
function toResult(index, match, offset = 0) {
|
||||
return {
|
||||
index,
|
||||
captureIndices: match.indices.map((indice) => {
|
||||
if (indice == null) {
|
||||
return {
|
||||
start: MAX,
|
||||
end: MAX,
|
||||
length: 0
|
||||
};
|
||||
}
|
||||
return {
|
||||
start: indice[0] + offset,
|
||||
end: indice[1] + offset,
|
||||
length: indice[1] - indice[0]
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
for (let i = 0; i < this.regexps.length; i++) {
|
||||
const regexp = this.regexps[i];
|
||||
if (!regexp)
|
||||
continue;
|
||||
try {
|
||||
regexp.lastIndex = startPosition;
|
||||
const match = regexp.exec(str);
|
||||
if (!match)
|
||||
continue;
|
||||
if (match.index === startPosition) {
|
||||
return toResult(i, match, 0);
|
||||
}
|
||||
pending.push([i, match, 0]);
|
||||
} catch (e) {
|
||||
if (this.options.forgiving)
|
||||
continue;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
if (pending.length) {
|
||||
const minIndex = Math.min(...pending.map((m) => m[1].index));
|
||||
for (const [i, match, offset] of pending) {
|
||||
if (match.index === minIndex) {
|
||||
return toResult(i, match, offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export { JavaScriptScanner as J };
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@shikijs/engine-javascript",
|
||||
"type": "module",
|
||||
"version": "3.23.0",
|
||||
"description": "Engine for Shiki using JavaScript's native RegExp",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/shikijs/shiki#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/shikijs/shiki.git",
|
||||
"directory": "packages/engine-javascript"
|
||||
},
|
||||
"bugs": "https://github.com/shikijs/shiki/issues",
|
||||
"keywords": [
|
||||
"shiki",
|
||||
"shiki-engine"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": "./dist/index.mjs",
|
||||
"./raw": "./dist/engine-raw.mjs"
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@shikijs/vscode-textmate": "^10.0.2",
|
||||
"oniguruma-to-es": "^4.3.4",
|
||||
"@shikijs/types": "3.23.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "unbuild --stub"
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Pine Wu
|
||||
Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
|
||||
|
||||
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.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# @shikijs/engine-oniguruma
|
||||
|
||||
Engine for Shiki using Oniguruma RegExp engine in WebAssembly.
|
||||
|
||||
[Documentation](https://shiki.style/guide/regex-engines)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
interface IOnigCaptureIndex {
|
||||
start: number;
|
||||
end: number;
|
||||
length: number;
|
||||
}
|
||||
interface IOnigMatch {
|
||||
index: number;
|
||||
captureIndices: IOnigCaptureIndex[];
|
||||
}
|
||||
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
|
||||
}
|
||||
interface OnigScanner {
|
||||
findNextMatchSync(string: string | OnigString, startPosition: number, options: OrMask<FindOption>): IOnigMatch | null;
|
||||
dispose?(): void;
|
||||
}
|
||||
interface OnigString {
|
||||
readonly content: string;
|
||||
dispose?(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A union of given const enum values.
|
||||
*/
|
||||
type OrMask<T extends number> = number;
|
||||
|
||||
type Awaitable<T> = T | Promise<T>;
|
||||
|
||||
interface PatternScanner extends OnigScanner {
|
||||
}
|
||||
interface RegexEngineString extends OnigString {
|
||||
}
|
||||
/**
|
||||
* Engine for RegExp matching and scanning.
|
||||
*/
|
||||
interface RegexEngine {
|
||||
createScanner: (patterns: (string | RegExp)[]) => PatternScanner;
|
||||
createString: (s: string) => RegexEngineString;
|
||||
}
|
||||
interface WebAssemblyInstantiator {
|
||||
(importObject: Record<string, Record<string, WebAssembly.ImportValue>> | undefined): Promise<WebAssemblyInstance>;
|
||||
}
|
||||
type WebAssemblyInstance = WebAssembly.WebAssemblyInstantiatedSource | WebAssembly.Instance | WebAssembly.Instance['exports'];
|
||||
type OnigurumaLoadOptions = {
|
||||
instantiator: WebAssemblyInstantiator;
|
||||
} | {
|
||||
default: WebAssemblyInstantiator;
|
||||
} | {
|
||||
data: ArrayBufferView | ArrayBuffer | Response;
|
||||
};
|
||||
type LoadWasmOptionsPlain = OnigurumaLoadOptions | WebAssemblyInstantiator | ArrayBufferView | ArrayBuffer | Response;
|
||||
type LoadWasmOptions = Awaitable<LoadWasmOptionsPlain> | (() => Awaitable<LoadWasmOptionsPlain>);
|
||||
|
||||
export type { LoadWasmOptions as L, RegexEngine as R, WebAssemblyInstantiator as W };
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { L as LoadWasmOptions, R as RegexEngine } from './chunk-index.d.mjs';
|
||||
|
||||
declare function loadWasm(options: LoadWasmOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Set the default wasm loader for `loadWasm`.
|
||||
* @internal
|
||||
*/
|
||||
declare function setDefaultWasmLoader(_loader: LoadWasmOptions): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare function getDefaultWasmLoader(): LoadWasmOptions | undefined;
|
||||
declare function createOnigurumaEngine(options?: LoadWasmOptions | null): Promise<RegexEngine>;
|
||||
|
||||
export { createOnigurumaEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
||||
+448
@@ -0,0 +1,448 @@
|
||||
class ShikiError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = "ShikiError";
|
||||
}
|
||||
}
|
||||
|
||||
function getHeapMax() {
|
||||
return 2147483648;
|
||||
}
|
||||
function _emscripten_get_now() {
|
||||
return typeof performance !== "undefined" ? performance.now() : Date.now();
|
||||
}
|
||||
const alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;
|
||||
async function main(init) {
|
||||
let wasmMemory;
|
||||
let buffer;
|
||||
const binding = {};
|
||||
function updateGlobalBufferAndViews(buf) {
|
||||
buffer = buf;
|
||||
binding.HEAPU8 = new Uint8Array(buf);
|
||||
binding.HEAPU32 = new Uint32Array(buf);
|
||||
}
|
||||
function _emscripten_memcpy_big(dest, src, num) {
|
||||
binding.HEAPU8.copyWithin(dest, src, src + num);
|
||||
}
|
||||
function emscripten_realloc_buffer(size) {
|
||||
try {
|
||||
wasmMemory.grow(size - buffer.byteLength + 65535 >>> 16);
|
||||
updateGlobalBufferAndViews(wasmMemory.buffer);
|
||||
return 1;
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
function _emscripten_resize_heap(requestedSize) {
|
||||
const oldSize = binding.HEAPU8.length;
|
||||
requestedSize = requestedSize >>> 0;
|
||||
const maxHeapSize = getHeapMax();
|
||||
if (requestedSize > maxHeapSize)
|
||||
return false;
|
||||
for (let cutDown = 1; cutDown <= 4; cutDown *= 2) {
|
||||
let overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);
|
||||
overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);
|
||||
const newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
|
||||
const replacement = emscripten_realloc_buffer(newSize);
|
||||
if (replacement)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
const UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;
|
||||
function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead = 1024) {
|
||||
const endIdx = idx + maxBytesToRead;
|
||||
let endPtr = idx;
|
||||
while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
|
||||
if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
|
||||
return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
|
||||
}
|
||||
let str = "";
|
||||
while (idx < endPtr) {
|
||||
let u0 = heapOrArray[idx++];
|
||||
if (!(u0 & 128)) {
|
||||
str += String.fromCharCode(u0);
|
||||
continue;
|
||||
}
|
||||
const u1 = heapOrArray[idx++] & 63;
|
||||
if ((u0 & 224) === 192) {
|
||||
str += String.fromCharCode((u0 & 31) << 6 | u1);
|
||||
continue;
|
||||
}
|
||||
const u2 = heapOrArray[idx++] & 63;
|
||||
if ((u0 & 240) === 224) {
|
||||
u0 = (u0 & 15) << 12 | u1 << 6 | u2;
|
||||
} else {
|
||||
u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;
|
||||
}
|
||||
if (u0 < 65536) {
|
||||
str += String.fromCharCode(u0);
|
||||
} else {
|
||||
const ch = u0 - 65536;
|
||||
str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function UTF8ToString(ptr, maxBytesToRead) {
|
||||
return ptr ? UTF8ArrayToString(binding.HEAPU8, ptr, maxBytesToRead) : "";
|
||||
}
|
||||
const asmLibraryArg = {
|
||||
emscripten_get_now: _emscripten_get_now,
|
||||
emscripten_memcpy_big: _emscripten_memcpy_big,
|
||||
emscripten_resize_heap: _emscripten_resize_heap,
|
||||
fd_write: () => 0
|
||||
};
|
||||
async function createWasm() {
|
||||
const info = {
|
||||
env: asmLibraryArg,
|
||||
wasi_snapshot_preview1: asmLibraryArg
|
||||
};
|
||||
const exports$1 = await init(info);
|
||||
wasmMemory = exports$1.memory;
|
||||
updateGlobalBufferAndViews(wasmMemory.buffer);
|
||||
Object.assign(binding, exports$1);
|
||||
binding.UTF8ToString = UTF8ToString;
|
||||
}
|
||||
await createWasm();
|
||||
return binding;
|
||||
}
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
let onigBinding = null;
|
||||
function throwLastOnigError(onigBinding2) {
|
||||
throw new ShikiError(onigBinding2.UTF8ToString(onigBinding2.getLastOnigError()));
|
||||
}
|
||||
class UtfString {
|
||||
constructor(str) {
|
||||
__publicField(this, "utf16Length");
|
||||
__publicField(this, "utf8Length");
|
||||
__publicField(this, "utf16Value");
|
||||
__publicField(this, "utf8Value");
|
||||
__publicField(this, "utf16OffsetToUtf8");
|
||||
__publicField(this, "utf8OffsetToUtf16");
|
||||
const utf16Length = str.length;
|
||||
const utf8Length = UtfString._utf8ByteLength(str);
|
||||
const computeIndicesMapping = utf8Length !== utf16Length;
|
||||
const utf16OffsetToUtf8 = computeIndicesMapping ? new Uint32Array(utf16Length + 1) : null;
|
||||
if (computeIndicesMapping)
|
||||
utf16OffsetToUtf8[utf16Length] = utf8Length;
|
||||
const utf8OffsetToUtf16 = computeIndicesMapping ? new Uint32Array(utf8Length + 1) : null;
|
||||
if (computeIndicesMapping)
|
||||
utf8OffsetToUtf16[utf8Length] = utf16Length;
|
||||
const utf8Value = new Uint8Array(utf8Length);
|
||||
let i8 = 0;
|
||||
for (let i16 = 0; i16 < utf16Length; i16++) {
|
||||
const charCode = str.charCodeAt(i16);
|
||||
let codePoint = charCode;
|
||||
let wasSurrogatePair = false;
|
||||
if (charCode >= 55296 && charCode <= 56319) {
|
||||
if (i16 + 1 < utf16Length) {
|
||||
const nextCharCode = str.charCodeAt(i16 + 1);
|
||||
if (nextCharCode >= 56320 && nextCharCode <= 57343) {
|
||||
codePoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;
|
||||
wasSurrogatePair = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (computeIndicesMapping) {
|
||||
utf16OffsetToUtf8[i16] = i8;
|
||||
if (wasSurrogatePair)
|
||||
utf16OffsetToUtf8[i16 + 1] = i8;
|
||||
if (codePoint <= 127) {
|
||||
utf8OffsetToUtf16[i8 + 0] = i16;
|
||||
} else if (codePoint <= 2047) {
|
||||
utf8OffsetToUtf16[i8 + 0] = i16;
|
||||
utf8OffsetToUtf16[i8 + 1] = i16;
|
||||
} else if (codePoint <= 65535) {
|
||||
utf8OffsetToUtf16[i8 + 0] = i16;
|
||||
utf8OffsetToUtf16[i8 + 1] = i16;
|
||||
utf8OffsetToUtf16[i8 + 2] = i16;
|
||||
} else {
|
||||
utf8OffsetToUtf16[i8 + 0] = i16;
|
||||
utf8OffsetToUtf16[i8 + 1] = i16;
|
||||
utf8OffsetToUtf16[i8 + 2] = i16;
|
||||
utf8OffsetToUtf16[i8 + 3] = i16;
|
||||
}
|
||||
}
|
||||
if (codePoint <= 127) {
|
||||
utf8Value[i8++] = codePoint;
|
||||
} else if (codePoint <= 2047) {
|
||||
utf8Value[i8++] = 192 | (codePoint & 1984) >>> 6;
|
||||
utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;
|
||||
} else if (codePoint <= 65535) {
|
||||
utf8Value[i8++] = 224 | (codePoint & 61440) >>> 12;
|
||||
utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;
|
||||
utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;
|
||||
} else {
|
||||
utf8Value[i8++] = 240 | (codePoint & 1835008) >>> 18;
|
||||
utf8Value[i8++] = 128 | (codePoint & 258048) >>> 12;
|
||||
utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;
|
||||
utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;
|
||||
}
|
||||
if (wasSurrogatePair)
|
||||
i16++;
|
||||
}
|
||||
this.utf16Length = utf16Length;
|
||||
this.utf8Length = utf8Length;
|
||||
this.utf16Value = str;
|
||||
this.utf8Value = utf8Value;
|
||||
this.utf16OffsetToUtf8 = utf16OffsetToUtf8;
|
||||
this.utf8OffsetToUtf16 = utf8OffsetToUtf16;
|
||||
}
|
||||
static _utf8ByteLength(str) {
|
||||
let result = 0;
|
||||
for (let i = 0, len = str.length; i < len; i++) {
|
||||
const charCode = str.charCodeAt(i);
|
||||
let codepoint = charCode;
|
||||
let wasSurrogatePair = false;
|
||||
if (charCode >= 55296 && charCode <= 56319) {
|
||||
if (i + 1 < len) {
|
||||
const nextCharCode = str.charCodeAt(i + 1);
|
||||
if (nextCharCode >= 56320 && nextCharCode <= 57343) {
|
||||
codepoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;
|
||||
wasSurrogatePair = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (codepoint <= 127)
|
||||
result += 1;
|
||||
else if (codepoint <= 2047)
|
||||
result += 2;
|
||||
else if (codepoint <= 65535)
|
||||
result += 3;
|
||||
else
|
||||
result += 4;
|
||||
if (wasSurrogatePair)
|
||||
i++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
createString(onigBinding2) {
|
||||
const result = onigBinding2.omalloc(this.utf8Length);
|
||||
onigBinding2.HEAPU8.set(this.utf8Value, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
const _OnigString = class _OnigString {
|
||||
constructor(str) {
|
||||
__publicField(this, "id", ++_OnigString.LAST_ID);
|
||||
__publicField(this, "_onigBinding");
|
||||
__publicField(this, "content");
|
||||
__publicField(this, "utf16Length");
|
||||
__publicField(this, "utf8Length");
|
||||
__publicField(this, "utf16OffsetToUtf8");
|
||||
__publicField(this, "utf8OffsetToUtf16");
|
||||
__publicField(this, "ptr");
|
||||
if (!onigBinding)
|
||||
throw new ShikiError("Must invoke loadWasm first.");
|
||||
this._onigBinding = onigBinding;
|
||||
this.content = str;
|
||||
const utfString = new UtfString(str);
|
||||
this.utf16Length = utfString.utf16Length;
|
||||
this.utf8Length = utfString.utf8Length;
|
||||
this.utf16OffsetToUtf8 = utfString.utf16OffsetToUtf8;
|
||||
this.utf8OffsetToUtf16 = utfString.utf8OffsetToUtf16;
|
||||
if (this.utf8Length < 1e4 && !_OnigString._sharedPtrInUse) {
|
||||
if (!_OnigString._sharedPtr)
|
||||
_OnigString._sharedPtr = onigBinding.omalloc(1e4);
|
||||
_OnigString._sharedPtrInUse = true;
|
||||
onigBinding.HEAPU8.set(utfString.utf8Value, _OnigString._sharedPtr);
|
||||
this.ptr = _OnigString._sharedPtr;
|
||||
} else {
|
||||
this.ptr = utfString.createString(onigBinding);
|
||||
}
|
||||
}
|
||||
convertUtf8OffsetToUtf16(utf8Offset) {
|
||||
if (this.utf8OffsetToUtf16) {
|
||||
if (utf8Offset < 0)
|
||||
return 0;
|
||||
if (utf8Offset > this.utf8Length)
|
||||
return this.utf16Length;
|
||||
return this.utf8OffsetToUtf16[utf8Offset];
|
||||
}
|
||||
return utf8Offset;
|
||||
}
|
||||
convertUtf16OffsetToUtf8(utf16Offset) {
|
||||
if (this.utf16OffsetToUtf8) {
|
||||
if (utf16Offset < 0)
|
||||
return 0;
|
||||
if (utf16Offset > this.utf16Length)
|
||||
return this.utf8Length;
|
||||
return this.utf16OffsetToUtf8[utf16Offset];
|
||||
}
|
||||
return utf16Offset;
|
||||
}
|
||||
dispose() {
|
||||
if (this.ptr === _OnigString._sharedPtr)
|
||||
_OnigString._sharedPtrInUse = false;
|
||||
else
|
||||
this._onigBinding.ofree(this.ptr);
|
||||
}
|
||||
};
|
||||
__publicField(_OnigString, "LAST_ID", 0);
|
||||
__publicField(_OnigString, "_sharedPtr", 0);
|
||||
// a pointer to a string of 10000 bytes
|
||||
__publicField(_OnigString, "_sharedPtrInUse", false);
|
||||
let OnigString = _OnigString;
|
||||
class OnigScanner {
|
||||
constructor(patterns) {
|
||||
__publicField(this, "_onigBinding");
|
||||
__publicField(this, "_ptr");
|
||||
if (!onigBinding)
|
||||
throw new ShikiError("Must invoke loadWasm first.");
|
||||
const strPtrsArr = [];
|
||||
const strLenArr = [];
|
||||
for (let i = 0, len = patterns.length; i < len; i++) {
|
||||
const utfString = new UtfString(patterns[i]);
|
||||
strPtrsArr[i] = utfString.createString(onigBinding);
|
||||
strLenArr[i] = utfString.utf8Length;
|
||||
}
|
||||
const strPtrsPtr = onigBinding.omalloc(4 * patterns.length);
|
||||
onigBinding.HEAPU32.set(strPtrsArr, strPtrsPtr / 4);
|
||||
const strLenPtr = onigBinding.omalloc(4 * patterns.length);
|
||||
onigBinding.HEAPU32.set(strLenArr, strLenPtr / 4);
|
||||
const scannerPtr = onigBinding.createOnigScanner(strPtrsPtr, strLenPtr, patterns.length);
|
||||
for (let i = 0, len = patterns.length; i < len; i++)
|
||||
onigBinding.ofree(strPtrsArr[i]);
|
||||
onigBinding.ofree(strLenPtr);
|
||||
onigBinding.ofree(strPtrsPtr);
|
||||
if (scannerPtr === 0)
|
||||
throwLastOnigError(onigBinding);
|
||||
this._onigBinding = onigBinding;
|
||||
this._ptr = scannerPtr;
|
||||
}
|
||||
dispose() {
|
||||
this._onigBinding.freeOnigScanner(this._ptr);
|
||||
}
|
||||
findNextMatchSync(string, startPosition, arg) {
|
||||
let options = 0 /* None */;
|
||||
if (typeof arg === "number") {
|
||||
options = arg;
|
||||
}
|
||||
if (typeof string === "string") {
|
||||
string = new OnigString(string);
|
||||
const result = this._findNextMatchSync(string, startPosition, false, options);
|
||||
string.dispose();
|
||||
return result;
|
||||
}
|
||||
return this._findNextMatchSync(string, startPosition, false, options);
|
||||
}
|
||||
_findNextMatchSync(string, startPosition, debugCall, options) {
|
||||
const onigBinding2 = this._onigBinding;
|
||||
const resultPtr = onigBinding2.findNextOnigScannerMatch(this._ptr, string.id, string.ptr, string.utf8Length, string.convertUtf16OffsetToUtf8(startPosition), options);
|
||||
if (resultPtr === 0) {
|
||||
return null;
|
||||
}
|
||||
const HEAPU32 = onigBinding2.HEAPU32;
|
||||
let offset = resultPtr / 4;
|
||||
const index = HEAPU32[offset++];
|
||||
const count = HEAPU32[offset++];
|
||||
const captureIndices = [];
|
||||
for (let i = 0; i < count; i++) {
|
||||
const beg = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);
|
||||
const end = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);
|
||||
captureIndices[i] = {
|
||||
start: beg,
|
||||
end,
|
||||
length: end - beg
|
||||
};
|
||||
}
|
||||
return {
|
||||
index,
|
||||
captureIndices
|
||||
};
|
||||
}
|
||||
}
|
||||
function isInstantiatorOptionsObject(dataOrOptions) {
|
||||
return typeof dataOrOptions.instantiator === "function";
|
||||
}
|
||||
function isInstantiatorModule(dataOrOptions) {
|
||||
return typeof dataOrOptions.default === "function";
|
||||
}
|
||||
function isDataOptionsObject(dataOrOptions) {
|
||||
return typeof dataOrOptions.data !== "undefined";
|
||||
}
|
||||
function isResponse(dataOrOptions) {
|
||||
return typeof Response !== "undefined" && dataOrOptions instanceof Response;
|
||||
}
|
||||
function isArrayBuffer(data) {
|
||||
return typeof ArrayBuffer !== "undefined" && (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) || typeof Buffer !== "undefined" && Buffer.isBuffer?.(data) || typeof SharedArrayBuffer !== "undefined" && data instanceof SharedArrayBuffer || typeof Uint32Array !== "undefined" && data instanceof Uint32Array;
|
||||
}
|
||||
let initPromise;
|
||||
function loadWasm(options) {
|
||||
if (initPromise)
|
||||
return initPromise;
|
||||
async function _load() {
|
||||
onigBinding = await main(async (info) => {
|
||||
let instance = options;
|
||||
instance = await instance;
|
||||
if (typeof instance === "function")
|
||||
instance = await instance(info);
|
||||
if (typeof instance === "function")
|
||||
instance = await instance(info);
|
||||
if (isInstantiatorOptionsObject(instance)) {
|
||||
instance = await instance.instantiator(info);
|
||||
} else if (isInstantiatorModule(instance)) {
|
||||
instance = await instance.default(info);
|
||||
} else {
|
||||
if (isDataOptionsObject(instance))
|
||||
instance = instance.data;
|
||||
if (isResponse(instance)) {
|
||||
if (typeof WebAssembly.instantiateStreaming === "function")
|
||||
instance = await _makeResponseStreamingLoader(instance)(info);
|
||||
else
|
||||
instance = await _makeResponseNonStreamingLoader(instance)(info);
|
||||
} else if (isArrayBuffer(instance)) {
|
||||
instance = await _makeArrayBufferLoader(instance)(info);
|
||||
} else if (instance instanceof WebAssembly.Module) {
|
||||
instance = await _makeArrayBufferLoader(instance)(info);
|
||||
} else if ("default" in instance && instance.default instanceof WebAssembly.Module) {
|
||||
instance = await _makeArrayBufferLoader(instance.default)(info);
|
||||
}
|
||||
}
|
||||
if ("instance" in instance)
|
||||
instance = instance.instance;
|
||||
if ("exports" in instance)
|
||||
instance = instance.exports;
|
||||
return instance;
|
||||
});
|
||||
}
|
||||
initPromise = _load();
|
||||
return initPromise;
|
||||
}
|
||||
function _makeArrayBufferLoader(data) {
|
||||
return (importObject) => WebAssembly.instantiate(data, importObject);
|
||||
}
|
||||
function _makeResponseStreamingLoader(data) {
|
||||
return (importObject) => WebAssembly.instantiateStreaming(data, importObject);
|
||||
}
|
||||
function _makeResponseNonStreamingLoader(data) {
|
||||
return async (importObject) => {
|
||||
const arrayBuffer = await data.arrayBuffer();
|
||||
return WebAssembly.instantiate(arrayBuffer, importObject);
|
||||
};
|
||||
}
|
||||
|
||||
let _defaultWasmLoader;
|
||||
function setDefaultWasmLoader(_loader) {
|
||||
_defaultWasmLoader = _loader;
|
||||
}
|
||||
function getDefaultWasmLoader() {
|
||||
return _defaultWasmLoader;
|
||||
}
|
||||
async function createOnigurumaEngine(options) {
|
||||
if (options)
|
||||
await loadWasm(options);
|
||||
return {
|
||||
createScanner(patterns) {
|
||||
return new OnigScanner(patterns.map((p) => typeof p === "string" ? p : p.source));
|
||||
},
|
||||
createString(s) {
|
||||
return new OnigString(s);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export { createOnigurumaEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };
|
||||
+1
@@ -0,0 +1 @@
|
||||
declare const binary: ArrayBuffer; export default binary;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { W as WebAssemblyInstantiator } from './chunk-index.d.mjs';
|
||||
|
||||
declare const wasmBinary: ArrayBuffer;
|
||||
declare const getWasmInstance: WebAssemblyInstantiator;
|
||||
|
||||
export { getWasmInstance as default, getWasmInstance, wasmBinary };
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
var binary = Uint8Array.from(atob("AGFzbQEAAAABoQEWYAJ/fwF/YAF/AX9gA39/fwF/YAR/f39/AX9gAX8AYAV/f39/fwF/YAN/f38AYAJ/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAAF/YAl/f39/f39/f38Bf2AIf39/f39/f38Bf2AAAGAEf39/fwBgA39+fwF+YAZ/fH9/f38Bf2AAAXxgBn9/f39/fwBgAnx/AXxgAn5/AX9gBX9/f39/AAJ1BANlbnYVZW1zY3JpcHRlbl9tZW1jcHlfYmlnAAYDZW52EmVtc2NyaXB0ZW5fZ2V0X25vdwARFndhc2lfc25hcHNob3RfcHJldmlldzEIZmRfd3JpdGUAAwNlbnYWZW1zY3JpcHRlbl9yZXNpemVfaGVhcAABA9MB0QENBAABAAECAgsCAAIEBAACAQEAAQMCAwkCBgUDBQgCAwwMAwkJAwgDAQIFAwMEAQUHCwgCAgsABQUBAgQCBgIAAQACBAIABwMHBgcAAwACAAICAAQBAgcAAgUCAAEBBgYABgQACAUICQsJDAAAAAAAAAACAgIDAAIDAgADAQABAAACBQICAAESAQEEAgIGAgUDAQUAAgEBAAoBAAEAAwMCAAACBgIOAgEPAQEBChMCBQkGAQ4UFRAHAwIBAAEECggCAQgIBwcNAQQABwABCgQBBQQFAXABMzMFBwEBgAKAgAIGDgJ/AUHQj9MCC38BQQALB5QCDwZtZW1vcnkCABFfX3dhc21fY2FsbF9jdG9ycwAEGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBABBfX2Vycm5vX2xvY2F0aW9uALABB29tYWxsb2MAwAEFb2ZyZWUAwQEQZ2V0TGFzdE9uaWdFcnJvcgDCARFjcmVhdGVPbmlnU2Nhbm5lcgDEAQ9mcmVlT25pZ1NjYW5uZXIAxQEYZmluZE5leHRPbmlnU2Nhbm5lck1hdGNoAMYBG2ZpbmROZXh0T25pZ1NjYW5uZXJNYXRjaERiZwDHAQlzdGFja1NhdmUA0QEMc3RhY2tSZXN0b3JlANIBCnN0YWNrQWxsb2MA0wEMZHluQ2FsbF9qaWppANQBCVIBAEEBCzIFCgsPHC9vcHRxcnN1ugG7Ab0BBgcICYABfoEBggGDAX97fIUBmwF9hAFvnAFvnQGeAZ8BoAGhAZIBogGYAZcBowGkAaUBqwGqAawBCuGICtEBFgBB/MsSQYzLEjYCAEG0yxJBKjYCAAsDAAELZgEDf0EBIQICQCAAKAIEIgMgACgCACIAayIEIAEoAgQgASgCACIBa0cNACAAIANJBEAgACAEaiEDA0AgAC0AACABLQAAayICDQIgAUEBaiEBIABBAWoiACADRw0ACwtBACECCyACC+cBAQZ/AkAgACgCACIBIAAoAgQiAE8NACAAIAFrIgJBB3EhAwJAIAFBf3MgAGpBB0kEQEEAIQIgASEADAELIAJBeHEhBkEAIQIDQCABLQAHIAEtAAYgAS0ABSABLQAEIAEtAAMgAS0AAiABLQABIAEtAAAgAkHlB2xqQeUHbGpB5QdsakHlB2xqQeUHbGpB5QdsakHlB2xqQeUHbGohAiABQQhqIgAhASAFQQhqIgUgBkcNAAsLIANFDQADQCAALQAAIAJB5QdsaiECIABBAWohACAEQQFqIgQgA0cNAAsLIAJBBXYgAmoLgAEBA39BASECAkAgACgCACABKAIARw0AIAAoAgQgASgCBEcNACAAKAIMIgMgACgCCCIAayIEIAEoAgwgASgCCCIBa0cNACAAIANJBEAgACAEaiEDA0AgAC0AACABLQAAayICDQIgAUEBaiEBIABBAWoiACADRw0ACwtBACECCyACC/MBAQd/AkAgACgCCCIBIAAoAgwiA08NACADIAFrIgJBB3EhBAJAIAFBf3MgA2pBB0kEQEEAIQIgASEDDAELIAJBeHEhB0EAIQIDQCABLQAHIAEtAAYgAS0ABSABLQAEIAEtAAMgAS0AAiABLQABIAEtAAAgAkHlB2xqQeUHbGpB5QdsakHlB2xqQeUHbGpB5QdsakHlB2xqQeUHbGohAiABQQhqIgMhASAGQQhqIgYgB0cNAAsLIARFDQADQCADLQAAIAJB5QdsaiECIANBAWohAyAFQQFqIgUgBEcNAAsLIAAvAQAgACgCBCACQQV2IAJqamoLJQAgASgCABDMASABKAIUIgIEQCACEMwBCyAAEMwBIAEQzAFBAgtqAQJ/AkAgASgCCCIAQQJOBEAgASgCFCEDQQAhAANAIAMgAEECdGoiBCACIAQoAgBBAnRqKAIANgIAIABBAWoiACABKAIISA0ACwwBCyAAQQFHDQAgASACIAEoAhBBAnRqKAIANgIQC0EAC/0JAQd/IwBBEGsiDiQAQZh+IQkCQCAFQQRLDQAgB0EASA0AIAUgB0gNACADQQNxRQ0AIARFDQAgBQRAIAUgB2shDANAIAYgCkECdGooAgAiC0UNAgJAIAogDE4EQCALQRBLDQRBASALdEGWgARxDQEMBAsgC0EBa0EFSQ0AIAtBEGtBAUsNAwsgCkEBaiIKIAVHDQALCyAAIAEgAhANRQRAQZx+IQkMAQsjAEEgayIJJABB5L8SKAIAIQwgDkEMaiIPQQA2AgACQCACIAFrIg1BAEwEQEGcfiELDAELIAlBADYCDAJAAkAgDARAIAkgAjYCHCAJIAE2AhggCUEANgIUIAkgADYCECAMIAlBEGogCUEMahCPASEKAkAgAEGUvRJGDQAgCg0AIAAtAExBAXFFDQAgCSACNgIcIAkgATYCGCAJQQA2AhQgCUGUvRI2AhAgDCAJQRBqIAlBDGoQjwEaCyAJKAIMIgpFDQEgCigCCCELDAILQYSYERCMASIMRQRAQXshCwwDC0HkvxIgDDYCAAtBeyELQQwQywEiCkUNASAKIAAgASACEHYiATYCACABRQRAIAoQzAEMAgtBEBDLASICRQ0BIAIgATYCCCACQQA2AgQgAiAANgIAIAIgASANajYCDCAMIAIgChCQASILBEAgAhDMASALQQBIDQILQei/EkHovxIoAgBBAWoiCzYCACAKIA02AgQgCiALNgIICyAPIAo2AgALIAlBIGokAAJAIAsiAUEASA0AQeC/EigCACIJRQRAAn9B4L8SQQA2AgBBDBDLASICBH9B+AUQywEiCUUEQCACEMwBQXsMAgsgAiAJNgIIIAJCgICAgKABNwIAQeC/EiACNgIAQQAFQXsLCyIJDQJB4L8SKAIAIQkLIAkoAgAiCiABTARAA0AgCSgCCCELIAkoAgQiAiAKTAR/IAsgAkGYAWwQzQEiC0UEQEF7IQkMBQsgCSALNgIIIAkgAkEBdDYCBCAJKAIABSAKC0HMAGwgC2pBAEHMABCoARogCSAJKAIAIgtBAWoiCjYCACABIAtKDQALCyAJKAIIIgwgAUHMAGxqIgogBzYCFCAKIAU2AhAgCkEANgIMIAogBDYCCCAKIAM2AgRBACEJIApBADYCACAKIA4oAgwoAgA2AkgCQCAFRQ0AIAVBA3EhBCAFQQFrQQNPBEAgBUF8cSECIAwgAUHMAGxqQRhqIQtBACEDA0AgCyAJQQJ0IgpqIAYgCmooAgA2AgAgCyAKQQRyIg1qIAYgDWooAgA2AgAgCyAKQQhyIg1qIAYgDWooAgA2AgAgCyAKQQxyIgpqIAYgCmooAgA2AgAgCUEEaiEJIANBBGoiAyACRw0ACwsgBEUNAEEAIQogDCABQcwAbGohAwNAIAMgCUECdCILaiAGIAtqKAIANgIYIAlBAWohCSAKQQFqIgogBEcNAAsLIAdBAEwNAEFiIQkgCEUNASAFIAdrIQlBACEKIAwgAUHMAGxqIQYDQAJAIAYgCUECdGooAhhBBEYEQCAAIAggCkEDdGoiBygCACAHKAIEEHYiC0UEQEF7IQkMBQsgBiAJQQN0aiIDIAs2AiggAyALIAcoAgQgBygCAGtqNgIsDAELIAYgCUEDdGogCCAKQQN0aikCADcCKAsgCkEBaiEKIAlBAWoiCSAFSA0ACwsgASEJCyAOQRBqJAAgCQtoAQR/AkAgASACTw0AIAEhAwNAIAMgAiAAKAIUEQAAIgVBX3FBwQBrQRpPBEAgBUEwa0EKSSIGIAEgA0ZxDQIgBUHfAEYgBnJFDQILIAMgACgCABEBACADaiIDIAJJDQALQQEhBAsgBAs3AQF/AkAgAUEATA0AIAAoAoQDIgBFDQAgACgCDCABSA0AIAAoAhQgAUHcAGxqQdwAayECCyACCwkAIAAQzAFBAgsQACAABEAgABARIAAQzAELC7cCAQJ/AkAgAEUNAAJAAkACQAJAAkACQAJAAkAgACgCAA4JAAIIBAUDBgEBCAsgACgCMEUNByAAKAIMIgFFDQcgASAAQRhqRw0GDAcLIAAoAgwiAQRAIAEQESABEMwBCyAAKAIQIgBFDQYDQCAAKAIQIQEgACgCDCICBEAgAhARIAIQzAELIAAQzAEgASIADQALDAYLIAAoAjAiAUUNBSABKAIAIgBFDQQgABDMAQwECyAAKAIMIgEEQCABEBEgARDMAQsgACgCEEEDRw0EIAAoAhQiAQRAIAEQESABEMwBCyAAKAIYIgFFDQQgARARDAMLIAAoAigiAUUNAwwCCyAAKAIMIgFFDQIgARARDAELIAAoAgwiAQRAIAEQESABEMwBCyAAKAIgIgFFDQEgARARCyABEMwBCwvlAgIFfwF+IABBADYCAEF6IQMCQCABKAIAIgJBCEsNAEEBIAJ0QccDcUUNAEEBQTgQzwEiAkUEQEF7DwsgAiABKQIAIgc3AgAgAiABKQIwNwIwIAIgASkCKDcCKCACIAEpAiA3AiAgAkEYaiIDIAEpAhg3AgAgAiABKQIQNwIQIAIgASkCCDcCCAJAAkACQAJAIAenDgIAAQILLine truncated
|
||||
|
||||
const wasmBinary = binary;
|
||||
const getWasmInstance = async (info) => {
|
||||
return WebAssembly.instantiate(wasmBinary, info).then((wasm) => wasm.instance.exports);
|
||||
};
|
||||
|
||||
export { getWasmInstance as default, getWasmInstance, wasmBinary };
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@shikijs/engine-oniguruma",
|
||||
"type": "module",
|
||||
"version": "3.23.0",
|
||||
"description": "Engine for Shiki using Oniguruma RegExp engine in WebAssembly",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/shikijs/shiki#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/shikijs/shiki.git",
|
||||
"directory": "packages/engine-oniguruma"
|
||||
},
|
||||
"bugs": "https://github.com/shikijs/shiki/issues",
|
||||
"keywords": [
|
||||
"shiki",
|
||||
"shiki-engine",
|
||||
"oniguruma"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": "./dist/index.mjs",
|
||||
"./wasm-inlined": "./dist/wasm-inlined.mjs"
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@shikijs/vscode-textmate": "^10.0.2",
|
||||
"@shikijs/types": "3.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vscode-oniguruma": "1.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rimraf dist && rollup -c",
|
||||
"dev": "rollup -cw"
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Pine Wu
|
||||
Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
|
||||
|
||||
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.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
# @shikijs/langs
|
||||
|
||||
TextMate grammars for Shiki.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias 1c-query for sdbl */
|
||||
export { default } from './sdbl.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias 1c for bsl */
|
||||
export { default } from './bsl.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"ABAP\",\"fileTypes\":[\"abap\",\"ABAP\"],\"foldingStartMarker\":\"/\\\\*\\\\*|\\\\{\\\\s*$\",\"foldingStopMarker\":\"\\\\*\\\\*/|^\\\\s*}\",\"name\":\"abap\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"punctuation.definition.comment.abap\"}},\"match\":\"^\\\\*.*\\\\n?\",\"name\":\"comment.line.full.abap\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.comment.abap\"}},\"match\":\"\\\".*\\\\n?\",\"name\":\"comment.line.partial.abap\"},{\"match\":\"(?<!\\\\S)##.*?(?=([,.:\\\\s]))\",\"name\":\"comment.line.pragma.abap\"},{\"match\":\"(?i)(?<=[-~\\\\s])(?<=[-=]>)([/_a-z][/-9_a-z]*)(?=\\\\s+(?:|[-*+/]|&&?)=\\\\s+)\",\"name\":\"variable.other.abap\"},{\"match\":\"\\\\b[0-9]+(\\\\b|[,.])\",\"name\":\"constant.numeric.abap\"},{\"match\":\"(?i)(^|\\\\s+)((P(?:UBLIC|RIVATE|ROTECTED))\\\\sSECTION)(?=\\\\s+|[.:])\",\"name\":\"storage.modifier.class.abap\"},{\"begin\":\"(?<!\\\\\\\\)(\\\\|)(.*?)\",\"beginCaptures\":{\"1\":{\"name\":\"constant.character.escape.abap\"}},\"end\":\"(?<!\\\\\\\\)(\\\\||(\\\\\\\\\\\\\\\\\\\\|))\",\"endCaptures\":{\"1\":{\"name\":\"constant.character.escape.abap\"}},\"name\":\"string.interpolated.abap\",\"patterns\":[{\"match\":\"(\\\\{ )|( })\",\"name\":\"constant.character.escape\"},{\"match\":\"\\\\\\\\\\\\|\",\"name\":\"constant.character.escape.abap\"},{\"match\":\"(?i)(?<=\\\\s)(align|alpha|case|country|currency|date|decimals|exponent|number|pad|sign|style|time|timestamp|timezone|width|xsd|zero)(?=\\\\s=)\",\"name\":\"entity.name.property.stringtemplate.abap\"},{\"match\":\"(?i)(?<==\\\\s)(center|engineering|environment|in|iso|left|leftplus|leftspace|lower|no|out|raw|right|rightplus|rightspace|scale_preserving|scale_preserving_scientific|scientific|scientific_with_leading_zero|sign_as_postfix|simple|space|upper|user|yes)(?=\\\\s)\",\"name\":\"entity.value.property.stringtemplate.abap\"}]},{\"begin\":\"'\",\"end\":\"'\",\"name\":\"string.quoted.single.abap\",\"patterns\":[{\"match\":\"''\",\"name\":\"constant.character.escape.abap\"}]},{\"begin\":\"`\",\"end\":\"`\",\"name\":\"string.quoted.single.abap\",\"patterns\":[{\"match\":\"``\",\"name\":\"constant.character.escape.abap\"}]},{\"begin\":\"(?i)^\\\\s*(class)\\\\s([/_a-z][/-9_a-z]*)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.block.abap\"},\"2\":{\"name\":\"entity.name.type.block.abap\"}},\"end\":\"\\\\s*\\\\.\\\\s*\\\\n?\",\"name\":\"meta.block.begin.implementation.abap\",\"patterns\":[{\"match\":\"(?i)(^|\\\\s+)(definition|implementation|public|inheriting\\\\s+from|final|deferred|abstract|shared\\\\s+memory\\\\s+enabled|(global|local)*\\\\s*friends|(create\\\\s+(p(?:ublic|rotected|rivate)))|for\\\\s+behavior\\\\s+of|for\\\\s+testing|risk\\\\s+level\\\\s+(critical|dangerous|harmless))|duration\\\\s(short|medium|long)(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.class.abap\"},{\"begin\":\"(?=[A-Z_a-z][0-9A-Z_a-z]*)\",\"contentName\":\"entity.name.type.block.abap\",\"end\":\"(?![0-9A-Z_a-z])\",\"patterns\":[{\"include\":\"#generic_names\"}]}]},{\"begin\":\"(?i)^\\\\s*(method)\\\\s(?:([/_a-z][/-9_a-z]*)~)?([/_a-z][/-9_a-z]*)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.block.abap\"},\"2\":{\"name\":\"entity.name.type.abap\"},\"3\":{\"name\":\"entity.name.function.abap\"}},\"end\":\"\\\\s*\\\\.\\\\s*\\\\n?\",\"patterns\":[{\"match\":\"(?i)(?<=^|\\\\s)(BY(?:\\\\s+DATABASE(\\\\s+PROCEDURE|\\\\s+FUNCTION|\\\\s+GRAPH\\\\s+WORKSPACE)|\\\\s+KERNEL\\\\s+MODULE))(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.method.abap\"},{\"match\":\"(?i)(?<=^|\\\\s)(FOR\\\\s+(HDB|LLANG))(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.method.abap\"},{\"match\":\"(?i)(?<=\\\\s)(OPTIONS\\\\s+(READ-ONLY|DETERMINISTIC|SUPPRESS\\\\s+SYNTAX\\\\s+ERRORS))(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.method.abap\"},{\"match\":\"(?i)(?<=^|\\\\s)(LANGUAGE\\\\s+(SQLSCRIPT|SQL|GRAPH))(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.method.abap\"},{\"captures\":{\"1\":{\"name\":\"storage.modifier.method.abap\"}},\"match\":\"(?i)(?<=\\\\s)(USING)\\\\s+([/_a-z][/-9=>_a-z]*)+(?=\\\\s+|\\\\.)\"},{\"begin\":\"(?=[A-Z_a-z][0-9A-Z_a-z]*)\",\"end\":\"(?![0-9A-Z_a-z])\",\"patterns\":[{\"include\":\"#generic_names\"}]}]},{\"begin\":\"(?i)^\\\\s*(INTERFACE)\\\\s([/_a-z][/-9_a-z]*)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.block.abap\"},\"2\":{\"name\":\"entity.name.type.abap\"}},\"end\":\"\\\\s*\\\\.\\\\s*\\\\n?\",\"patterns\":[{\"match\":\"(?i)(?<=^|\\\\s)(DEFERRED|PUBLIC)(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.method.abap\"}]},{\"begin\":\"(?i)^\\\\s*(FORM)\\\\s([/_a-z][-/-9?_a-z]*)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.block.abap\"},\"2\":{\"name\":\"entity.name.type.abap\"}},\"end\":\"\\\\s*\\\\.\\\\s*\\\\n?\",\"patterns\":[{\"match\":\"(?i)(?<=^|\\\\s)(USING|TABLES|CHANGING|RAISING|IMPLEMENTATION|DEFINITION)(?=\\\\s+|\\\\.)\",\"name\":\"storage.modifier.form.abap\"},{\"include\":\"#abaptypes\"},{\"include\":\"#keywords_followed_by_braces\"}]},{\"match\":\"(?i)(endLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"ActionScript\",\"fileTypes\":[\"as\"],\"name\":\"actionscript-3\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#package\"},{\"include\":\"#class\"},{\"include\":\"#interface\"},{\"include\":\"#namespace_declaration\"},{\"include\":\"#import\"},{\"include\":\"#mxml\"},{\"include\":\"#strings\"},{\"include\":\"#regexp\"},{\"include\":\"#variable_declaration\"},{\"include\":\"#numbers\"},{\"include\":\"#primitive_types\"},{\"include\":\"#primitive_error_types\"},{\"include\":\"#dynamic_type\"},{\"include\":\"#primitive_functions\"},{\"include\":\"#language_constants\"},{\"include\":\"#language_variables\"},{\"include\":\"#guess_type\"},{\"include\":\"#guess_constant\"},{\"include\":\"#other_operators\"},{\"include\":\"#arithmetic_operators\"},{\"include\":\"#logical_operators\"},{\"include\":\"#array_access_operators\"},{\"include\":\"#vector_creation_operators\"},{\"include\":\"#control_keywords\"},{\"include\":\"#other_keywords\"},{\"include\":\"#use_namespace\"},{\"include\":\"#functions\"}],\"repository\":{\"arithmetic_operators\":{\"match\":\"([-%+/]|(?<!:)\\\\*)\",\"name\":\"keyword.operator.actionscript.3\"},\"array_access_operators\":{\"match\":\"([]\\\\[])\",\"name\":\"keyword.operator.actionscript.3\"},\"class\":{\"begin\":\"(^|\\\\s+|;)(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(\\\\b(internal|public)\\\\b\\\\s+)?(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(?=\\\\bclass\\\\b)\",\"beginCaptures\":{\"3\":{\"name\":\"storage.modifier.actionscript.3\"},\"5\":{\"name\":\"storage.modifier.actionscript.3\"},\"7\":{\"name\":\"storage.modifier.actionscript.3\"}},\"end\":\"}\",\"name\":\"meta.class.actionscript.3\",\"patterns\":[{\"include\":\"#class_declaration\"},{\"include\":\"#declaration_code_block\"},{\"include\":\"#metadata\"},{\"include\":\"#method\"},{\"include\":\"#comments\"},{\"include\":\"#strings\"},{\"include\":\"#regexp\"},{\"include\":\"#numbers\"},{\"include\":\"#primitive_types\"},{\"include\":\"#primitive_error_types\"},{\"include\":\"#dynamic_type\"},{\"include\":\"#primitive_functions\"},{\"include\":\"#language_constants\"},{\"include\":\"#language_variables\"},{\"include\":\"#other_operators\"},{\"include\":\"#other_keywords\"},{\"include\":\"#use_namespace\"},{\"include\":\"#guess_type\"},{\"include\":\"#guess_constant\"},{\"include\":\"#arithmetic_operators\"},{\"include\":\"#array_access_operators\"},{\"include\":\"#vector_creation_operators\"},{\"include\":\"#variable_declaration\"},{\"include\":\"#object_literal\"},{\"include\":\"#conditional_compilation\"}]},\"class_declaration\":{\"begin\":\"\\\\b(class)\\\\b\\\\s+([$.0-9A-Z_a-z]+|\\\\*)\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.class.actionscript.3\"},\"2\":{\"name\":\"entity.name.class.actionscript.3\"}},\"end\":\"\\\\{\",\"name\":\"meta.class_declaration.actionscript.3\",\"patterns\":[{\"include\":\"#extends\"},{\"include\":\"#implements\"},{\"include\":\"#comments\"}]},\"comments\":{\"patterns\":[{\"begin\":\"/\\\\*\\\\*(?!/)\",\"end\":\"\\\\*/\",\"name\":\"comment.block.documentation.actionscript.3\",\"patterns\":[{\"match\":\"@(copy|default|eventType|example|exampleText|includeExample|inheritDoc|internal|param|private|return|see|since|throws)\\\\b\",\"name\":\"keyword.other.documentation.actionscript.3.asdoc\"}]},{\"begin\":\"/\\\\*\",\"end\":\"\\\\*/\",\"name\":\"comment.block.actionscript.3\"},{\"match\":\"//.*\",\"name\":\"comment.line.actionscript.3\"}]},\"conditional_compilation\":{\"captures\":{\"2\":{\"name\":\"constant.other.actionscript.3\"},\"3\":{\"name\":\"constant.other.actionscript.3\"}},\"match\":\"(^|\\\\s+|;)\\\\b(\\\\w+)\\\\b::\\\\b(\\\\w+)\\\\b\",\"name\":\"meta.conditional.actionscript.3\"},\"control_keywords\":{\"match\":\"\\\\b(if|else|do|while|for|each|continue|return|switch|case|default|break|try|catch|finally|throw|with)\\\\b\",\"name\":\"keyword.control.actionscript.3\"},\"declaration_code_block\":{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"meta.code_block.actionscript.3\",\"patterns\":[{\"include\":\"#method\"},{\"include\":\"#variable_declaration\"},{\"include\":\"#comments\"},{\"include\":\"#strings\"},{\"include\":\"#regexp\"},{\"include\":\"#numbers\"},{\"include\":\"#primitive_types\"},{\"include\":\"#primitive_error_types\"},{\"include\":\"#dynamic_type\"},{\"include\":\"#primitive_functions\"},{\"include\":\"#language_constants\"},{\"include\":\"#language_variables\"},{\"include\":\"#guess_type\"},{\"include\":\"#guess_constant\"},{\"include\":\"#other_operators\"},{\"include\":\"#arithmetic_operators\"},{\"include\":\"#logical_operators\"},{\"include\":\"#array_access_operators\"},{\"include\":\"#vector_creation_operators\"},{\"include\":\"#control_keywords\"},{\"include\":\"#other_keywords\"},{\"include\":\"#use_namespace\"},{\"include\":\"#functions\"},{\"include\":\"#import\"}]},\"dynamic_type\":{\"captures\":{\"1\":{\"name\":\"support.type.actionscript.3\"}},\"match\":\"(?<=:)\\\\s*(\\\\*)\"},\"escapes\"Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Ada\",\"name\":\"ada\",\"patterns\":[{\"include\":\"#library_unit\"},{\"include\":\"#comment\"},{\"include\":\"#use_clause\"},{\"include\":\"#with_clause\"},{\"include\":\"#pragma\"},{\"include\":\"#keyword\"}],\"repository\":{\"abort_statement\":{\"begin\":\"(?i)\\\\babort\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.control.ada\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"name\":\"meta.statement.abort.ada\",\"patterns\":[{\"match\":\",\",\"name\":\"punctuation.ada\"},{\"match\":\"\\\\b([._\\\\w\\\\d])+\\\\b\",\"name\":\"entity.name.task.ada\"}]},\"accept_statement\":{\"begin\":\"(?i)\\\\b(accept)\\\\s+([._\\\\w\\\\d]+)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.ada\"},\"2\":{\"name\":\"entity.name.accept.ada\"}},\"end\":\"(?i)(?:\\\\b(end)\\\\s*(\\\\s\\\\2)?\\\\s*)?(;)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.ada\"},\"2\":{\"name\":\"entity.name.accept.ada\"},\"3\":{\"name\":\"punctuation.ada\"}},\"name\":\"meta.statement.accept.ada\",\"patterns\":[{\"begin\":\"(?i)\\\\bdo\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.control.ada\"}},\"end\":\"(?i)\\\\b(?=end)\\\\b\",\"patterns\":[{\"include\":\"#statement\"}]},{\"include\":\"#parameter_profile\"}]},\"access_definition\":{\"captures\":{\"1\":{\"name\":\"storage.visibility.ada\"},\"2\":{\"name\":\"storage.visibility.ada\"},\"3\":{\"name\":\"storage.modifier.ada\"},\"4\":{\"name\":\"entity.name.type.ada\"}},\"match\":\"(?i)(not\\\\s+null\\\\s+)?(access)\\\\s+(constant\\\\s+)?([._\\\\w\\\\d]+)\\\\b\",\"name\":\"meta.declaration.access.definition.ada\"},\"access_type_definition\":{\"begin\":\"(?i)\\\\b(not\\\\s+null\\\\s+)?(access)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"storage.visibility.ada\"},\"2\":{\"name\":\"storage.visibility.ada\"}},\"end\":\"(?i)(?=(with|;))\",\"name\":\"meta.declaration.type.definition.access.ada\",\"patterns\":[{\"match\":\"(?i)\\\\ball\\\\b\",\"name\":\"storage.visibility.ada\"},{\"match\":\"(?i)\\\\bconstant\\\\b\",\"name\":\"storage.modifier.ada\"},{\"include\":\"#subtype_mark\"}]},\"actual_parameter_part\":{\"begin\":\"\\\\(\",\"captures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"end\":\"\\\\)\",\"patterns\":[{\"match\":\",\",\"name\":\"punctuation.ada\"},{\"include\":\"#parameter_association\"}]},\"adding_operator\":{\"match\":\"([-\\\\&+])\",\"name\":\"keyword.operator.adding.ada\"},\"array_aggregate\":{\"begin\":\"\\\\(\",\"captures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"end\":\"\\\\)\",\"name\":\"meta.definition.array.aggregate.ada\",\"patterns\":[{\"match\":\",\",\"name\":\"punctuation.ada\"},{\"include\":\"#positional_array_aggregate\"},{\"include\":\"#array_component_association\"}]},\"array_component_association\":{\"captures\":{\"1\":{\"name\":\"variable.name.ada\"},\"2\":{\"name\":\"keyword.other.ada\"},\"3\":{\"patterns\":[{\"match\":\"<>\",\"name\":\"keyword.modifier.unknown.ada\"},{\"include\":\"#expression\"}]}},\"match\":\"(?i)\\\\b([^()=>]*)\\\\s*(=>)\\\\s*([^),]+)\",\"name\":\"meta.definition.array.aggregate.component.ada\"},\"array_dimensions\":{\"begin\":\"\\\\(\",\"captures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"end\":\"\\\\)\",\"name\":\"meta.declaration.type.definition.array.dimensions.ada\",\"patterns\":[{\"match\":\",\",\"name\":\"punctuation.ada\"},{\"match\":\"(?i)\\\\brange\\\\b\",\"name\":\"storage.modifier.ada\"},{\"match\":\"<>\",\"name\":\"keyword.modifier.unknown.ada\"},{\"match\":\"\\\\.\\\\.\",\"name\":\"keyword.ada\"},{\"include\":\"#expression\"},{\"patterns\":[{\"include\":\"#subtype_mark\"}]}]},\"array_type_definition\":{\"begin\":\"(?i)\\\\barray\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"storage.modifier.ada\"}},\"end\":\"(?i)(?=(with|;))\",\"name\":\"meta.declaration.type.definition.array.ada\",\"patterns\":[{\"include\":\"#array_dimensions\"},{\"match\":\"(?i)\\\\bof\\\\b\",\"name\":\"storage.modifier.ada\"},{\"match\":\"(?i)\\\\baliased\\\\b\",\"name\":\"storage.visibility.ada\"},{\"include\":\"#access_definition\"},{\"include\":\"#subtype_mark\"}]},\"aspect_clause\":{\"begin\":\"(?i)\\\\b(for)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.ada\"},\"2\":{\"patterns\":[{\"include\":\"#subtype_mark\"}]},\"3\":{\"name\":\"punctuation.ada\"},\"5\":{\"name\":\"keyword.ada\"}},\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"name\":\"meta.aspect.clause.ada\",\"patterns\":[{\"begin\":\"(?i)\\\\buse\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.ada\"}},\"end\":\"(?=;)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.ada\"}},\"patterns\":[{\"include\":\"#record_representation_clause\"},{\"include\":\"#array_aggregate\"},{\"include\":\"#expression\"}]},{\"begin\":\"(?i)(?<=for)\",\"captures\":{\"0\":{\"name\":\"keyword.ada\"}},\"end\":\"(?i)(?=use)\",\"patterns\":[{\"captures\":{\"1\":{\"patterns\":[{\"include\":\"#subtype_mark\"}]},\"2\":{\"patterns\":[{\"include\":\"#attribute\"}]}},\"match\":\"([_\\\\w\\\\d]+)('([_\\\\Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias adoc for asciidoc */
|
||||
export { default } from './asciidoc.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"injectionSelector\":\"L:text.html -comment\",\"name\":\"angular-expression\",\"patterns\":[{\"include\":\"#ngExpression\"}],\"repository\":{\"arrayLiteral\":{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"meta.brace.square.ts\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.square.ts\"}},\"name\":\"meta.array.literal.ts\",\"patterns\":[{\"include\":\"#ngExpression\"},{\"include\":\"#punctuationComma\"}]},\"booleanLiteral\":{\"patterns\":[{\"match\":\"(?<![$.])\\\\btrue\\\\b(?!\\\\$)\",\"name\":\"constant.language.boolean.true.ts\"},{\"match\":\"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)\",\"name\":\"constant.language.boolean.false.ts\"}]},\"expressionOperator\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.operator.logical.ts\"},\"2\":{\"name\":\"entity.name.function.pipe.ng\"}},\"match\":\"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)\"},{\"match\":\"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)\",\"name\":\"storage.type.ts\"},{\"match\":\"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)\",\"name\":\"keyword.control.flow.ts\"},{\"match\":\"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.expression.delete.ts\"},{\"match\":\"(?<![$.])\\\\bin\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.expression.in.ts\"},{\"match\":\"(?<![$.])\\\\bof\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.expression.of.ts\"},{\"match\":\"(?<![$.])\\\\bif\\\\b(?!\\\\$)\",\"name\":\"keyword.control.if.ts\"},{\"match\":\"(?<![$.])\\\\belse\\\\b(?!\\\\$)\",\"name\":\"keyword.control.else.ts\"},{\"match\":\"(?<![$.])\\\\bthen\\\\b(?!\\\\$)\",\"name\":\"keyword.control.then.ts\"},{\"match\":\"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.expression.instanceof.ts\"},{\"match\":\"(?<![$.])\\\\bnew\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.new.ts\"},{\"match\":\"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)\",\"name\":\"keyword.operator.expression.void.ts\"},{\"begin\":\"(?<![$.])\\\\bas\\\\b(?!\\\\$)\",\"beginCaptures\":{\"0\":{\"name\":\"storage.type.as.ts\"}},\"end\":\"(?=$|[]\\\"'),:;}])\",\"patterns\":[{\"include\":\"#type\"}]},{\"match\":\"(?:\\\\*|(?<!\\\\()/|[-%+])=\",\"name\":\"keyword.operator.assignment.compound.ts\"},{\"match\":\"(?:[\\\\&^]|<<|>>>??|\\\\|)=\",\"name\":\"keyword.operator.assignment.compound.bitwise.ts\"},{\"match\":\"<<|>>>?\",\"name\":\"keyword.operator.bitwise.shift.ts\"},{\"match\":\"[!=]==?\",\"name\":\"keyword.operator.comparison.ts\"},{\"match\":\"<=|>=|<>|[<>]\",\"name\":\"keyword.operator.relational.ts\"},{\"match\":\"!|&&|\\\\?\\\\?|\\\\|\\\\|\",\"name\":\"keyword.operator.logical.ts\"},{\"match\":\"[\\\\&^|~]\",\"name\":\"keyword.operator.bitwise.ts\"},{\"match\":\"=\",\"name\":\"keyword.operator.assignment.ts\"},{\"match\":\"--\",\"name\":\"keyword.operator.decrement.ts\"},{\"match\":\"\\\\+\\\\+\",\"name\":\"keyword.operator.increment.ts\"},{\"match\":\"[-%*+/]\",\"name\":\"keyword.operator.arithmetic.ts\"},{\"captures\":{\"1\":{\"name\":\"keyword.operator.arithmetic.ts\"}},\"match\":\"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])\"},{\"include\":\"#typeofOperator\"}]},\"functionCall\":{\"begin\":\"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()\",\"end\":\"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()\",\"patterns\":[{\"match\":\"\\\\?\",\"name\":\"punctuation.accessor.ts\"},{\"match\":\"\\\\.\",\"name\":\"punctuation.accessor.ts\"},{\"match\":\"([$_[:alpha:]][$_[:alnum:]]*)\",\"name\":\"entity.name.function.ts\"},{\"begin\":\"<\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.typeparameters.begin.ts\"}},\"end\":\">\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.typeparameters.end.ts\"}},\"name\":\"meta.type.parameters.ts\",\"patterns\":[{\"include\":\"#type\"},{\"include\":\"#punctuationComma\"}]},{\"include\":\"#parenExpression\"}]},\"functionParameters\":{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.begin.ts\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.ts\"}},\"name\":\"meta.parameters.ts\",\"patterns\":[{\"include\":\"#decorator\"},{\"include\":\"#parameterName\"},{\"include\":\"#variableInitializer\"},{\"match\":\",\",\"name\":\"punctuation.separator.parameter.ts\"}]},\"identifiers\":{\"patterns\":[{\"match\":\"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))\",\"name\":\"support.class.ts\"},{\"captures\":{\"1\":{\"name\":\"punctuation.accessor.ts\"},\"2\":{\"name\":\"constant.other.object.property.ts\"},\"3\":{\"name\":\"variable.other.object.property.ts\"}},\"match\":\"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)\"},{\"captures\":{\"1\":{\"name\":\"punctuation.accessor.ts\"},\"2\":{\"name\":\"entity.name.function.ts\"}},\"match\":\"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*(Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import html from './html.mjs'
|
||||
import angular_expression from './angular-expression.mjs'
|
||||
import angular_let_declaration from './angular-let-declaration.mjs'
|
||||
import angular_template from './angular-template.mjs'
|
||||
import angular_template_blocks from './angular-template-blocks.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Angular HTML\",\"injections\":{\"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)\":{\"patterns\":[{\"match\":\"<\",\"name\":\"invalid.illegal.bad-angle-bracket.html\"}]}},\"name\":\"angular-html\",\"patterns\":[{\"include\":\"text.html.basic#core-minus-invalid\"},{\"begin\":\"(</?)(\\\\w[^>\\\\s]*)(?<!/)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.begin.html\"},\"2\":{\"name\":\"entity.name.tag.html\"}},\"end\":\"((?: ?/)?>)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.end.html\"}},\"name\":\"meta.tag.other.unrecognized.html.derivative\",\"patterns\":[{\"include\":\"text.html.basic#attribute\"}]}],\"scopeName\":\"text.html.derivative.ng\",\"embeddedLangs\":[\"html\",\"angular-expression\",\"angular-let-declaration\",\"angular-template\",\"angular-template-blocks\"]}"))
|
||||
|
||||
export default [
|
||||
...html,
|
||||
...angular_expression,
|
||||
...angular_let_declaration,
|
||||
...angular_template,
|
||||
...angular_template_blocks,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import scss from './scss.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"injectTo\":[\"source.ts.ng\"],\"injectionSelector\":\"L:source.ts#meta.decorator.ts -comment\",\"name\":\"angular-inline-style\",\"patterns\":[{\"include\":\"#inlineStyles\"}],\"repository\":{\"inlineStyles\":{\"begin\":\"(styles)\\\\s*(:)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.object-literal.key.ts\"},\"2\":{\"name\":\"meta.object-literal.key.ts punctuation.separator.key-value.ts\"}},\"end\":\"(?=[,}])\",\"patterns\":[{\"include\":\"#tsParenExpression\"},{\"include\":\"#tsBracketExpression\"},{\"include\":\"#style\"}]},\"style\":{\"begin\":\"\\\\s*([\\\"'`|])\",\"beginCaptures\":{\"1\":{\"name\":\"string\"}},\"contentName\":\"source.css.scss\",\"end\":\"\\\\1\",\"endCaptures\":{\"0\":{\"name\":\"string\"}},\"patterns\":[{\"include\":\"source.css.scss\"}]},\"tsBracketExpression\":{\"begin\":\"\\\\G\\\\s*(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.array.literal.ts meta.brace.square.ts\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"meta.array.literal.ts meta.brace.square.ts\"}},\"patterns\":[{\"include\":\"#style\"}]},\"tsParenExpression\":{\"begin\":\"\\\\G\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"meta.brace.round.ts\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.round.ts\"}},\"patterns\":[{\"include\":\"$self\"},{\"include\":\"#tsBracketExpression\"},{\"include\":\"#style\"}]}},\"scopeName\":\"inline-styles.ng\",\"embeddedLangs\":[\"scss\"]}"))
|
||||
|
||||
export default [
|
||||
...scss,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import angular_html from './angular-html.mjs'
|
||||
import angular_template from './angular-template.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"injectTo\":[\"source.ts.ng\"],\"injectionSelector\":\"L:meta.decorator.ts -comment -text.html\",\"name\":\"angular-inline-template\",\"patterns\":[{\"include\":\"#inlineTemplate\"}],\"repository\":{\"inlineTemplate\":{\"begin\":\"(template)\\\\s*(:)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.object-literal.key.ts\"},\"2\":{\"name\":\"meta.object-literal.key.ts punctuation.separator.key-value.ts\"}},\"end\":\"(?=[,}])\",\"patterns\":[{\"include\":\"#tsParenExpression\"},{\"include\":\"#ngTemplate\"}]},\"ngTemplate\":{\"begin\":\"\\\\G\\\\s*([\\\"'`|])\",\"beginCaptures\":{\"1\":{\"name\":\"string\"}},\"contentName\":\"text.html.derivative.ng\",\"end\":\"\\\\1\",\"endCaptures\":{\"0\":{\"name\":\"string\"}},\"patterns\":[{\"include\":\"text.html.derivative.ng\"},{\"include\":\"template.ng\"}]},\"tsParenExpression\":{\"begin\":\"\\\\G\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"meta.brace.round.ts\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.round.ts\"}},\"patterns\":[{\"include\":\"#tsParenExpression\"},{\"include\":\"#ngTemplate\"}]}},\"scopeName\":\"inline-template.ng\",\"embeddedLangs\":[\"angular-html\",\"angular-template\"]}"))
|
||||
|
||||
export default [
|
||||
...angular_html,
|
||||
...angular_template,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import angular_expression from './angular-expression.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"injectTo\":[\"text.html.derivative\",\"text.html.derivative.ng\",\"source.ts.ng\"],\"injectionSelector\":\"L:text.html -comment -expression.ng -meta.tag -source.css -source.js\",\"name\":\"angular-let-declaration\",\"patterns\":[{\"include\":\"#letDeclaration\"}],\"repository\":{\"letDeclaration\":{\"begin\":\"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.ng\"},\"2\":{\"name\":\"variable.other.constant.ng\"},\"3\":{\"name\":\"keyword.operator.assignment.ng\"}},\"end\":\"(?<=;)\",\"name\":\"meta.definition.variable.ng\",\"patterns\":[{\"include\":\"#letInitializer\"}]},\"letInitializer\":{\"begin\":\"\\\\s*\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.operator.assignment.ng\"}},\"contentName\":\"meta.definition.variable.initializer.ng\",\"end\":\";\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.terminator.statement.ng\"}},\"patterns\":[{\"include\":\"expression.ng\"}]}},\"scopeName\":\"template.let.ng\",\"embeddedLangs\":[\"angular-expression\"]}"))
|
||||
|
||||
export default [
|
||||
...angular_expression,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import angular_expression from './angular-expression.mjs'
|
||||
import angular_template from './angular-template.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"injectTo\":[\"text.html.derivative\",\"text.html.derivative.ng\",\"source.ts.ng\"],\"injectionSelector\":\"L:text.html -comment -expression.ng -meta.tag -source.css -source.js\",\"name\":\"angular-template-blocks\",\"patterns\":[{\"include\":\"#block\"}],\"repository\":{\"block\":{\"begin\":\"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*\",\"beginCaptures\":{\"1\":{\"patterns\":[{\"include\":\"#transition\"}]},\"2\":{\"name\":\"keyword.control.block.kind.ng\"}},\"end\":\"(?<=})\",\"name\":\"control.block.ng\",\"patterns\":[{\"include\":\"#blockExpression\"},{\"include\":\"#blockBody\"}]},\"blockBody\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ts\"}},\"contentName\":\"control.block.body.ng\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ts\"}},\"patterns\":[{\"include\":\"text.html.derivative.ng\"},{\"include\":\"template.ng\"}]},\"blockExpression\":{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"meta.brace.round.ts\"}},\"contentName\":\"control.block.expression.ng\",\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.round.ts\"}},\"patterns\":[{\"include\":\"#blockExpressionOfClause\"},{\"include\":\"#blockExpressionLetBinding\"},{\"include\":\"#blockExpressionTrackClause\"},{\"include\":\"expression.ng\"}]},\"blockExpressionLetBinding\":{\"begin\":\"\\\\blet\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"storage.type.ng\"}},\"end\":\"(?=[$)])|(?<=;)\",\"patterns\":[{\"include\":\"expression.ng\"}]},\"blockExpressionOfClause\":{\"begin\":\"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"variable.other.constant.ng\"},\"2\":{\"name\":\"keyword.operator.expression.of.ng\"}},\"end\":\"(?=[$)])|(?<=;)\",\"patterns\":[{\"include\":\"expression.ng\"}]},\"blockExpressionTrackClause\":{\"begin\":\"\\\\btrack\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.control.track.ng\"}},\"end\":\"(?=[$)])|(?<=;)\",\"patterns\":[{\"include\":\"expression.ng\"}]},\"transition\":{\"match\":\"@\",\"name\":\"keyword.control.block.transition.ng\"}},\"scopeName\":\"template.blocks.ng\",\"embeddedLangs\":[\"angular-expression\",\"angular-template\"]}"))
|
||||
|
||||
export default [
|
||||
...angular_expression,
|
||||
...angular_template,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import angular_expression from './angular-expression.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"injectTo\":[\"text.html.derivative\",\"text.html.derivative.ng\",\"source.ts.ng\"],\"injectionSelector\":\"L:text.html -comment\",\"name\":\"angular-template\",\"patterns\":[{\"include\":\"#interpolation\"}],\"repository\":{\"interpolation\":{\"begin\":\"\\\\{\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ts\"}},\"contentName\":\"expression.ng\",\"end\":\"}}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ts\"}},\"patterns\":[{\"include\":\"expression.ng\"}]}},\"scopeName\":\"template.ng\",\"embeddedLangs\":[\"angular-expression\"]}"))
|
||||
|
||||
export default [
|
||||
...angular_expression,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import angular_expression from './angular-expression.mjs'
|
||||
import angular_inline_style from './angular-inline-style.mjs'
|
||||
import angular_inline_template from './angular-inline-template.mjs'
|
||||
import angular_let_declaration from './angular-let-declaration.mjs'
|
||||
import angular_template from './angular-template.mjs'
|
||||
import angular_template_blocks from './angular-template-blocks.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Angular TypeScript\",\"name\":\"angular-ts\",\"patterns\":[{\"include\":\"#directives\"},{\"include\":\"#statements\"},{\"include\":\"#shebang\"}],\"repository\":{\"access-modifier\":{\"match\":\"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))\",\"name\":\"storage.modifier.ts\"},\"after-operator-block-as-object-literal\":{\"begin\":\"(?<!\\\\+\\\\+|--)(?<=[!(+,:=>?\\\\[]|^await|[^$._[:alnum:]]await|^return|[^$._[:alnum:]]return|^yield|[^$._[:alnum:]]yield|^throw|[^$._[:alnum:]]throw|^in|[^$._[:alnum:]]in|^of|[^$._[:alnum:]]of|^typeof|[^$._[:alnum:]]typeof|&&|\\\\|\\\\||\\\\*)\\\\s*(\\\\{)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.block.ts\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ts\"}},\"name\":\"meta.objectliteral.ts\",\"patterns\":[{\"include\":\"#object-member\"}]},\"array-binding-pattern\":{\"begin\":\"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.operator.rest.ts\"},\"2\":{\"name\":\"punctuation.definition.binding-pattern.array.ts\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.binding-pattern.array.ts\"}},\"patterns\":[{\"include\":\"#binding-element\"},{\"include\":\"#punctuation-comma\"}]},\"array-binding-pattern-const\":{\"begin\":\"(?:(\\\\.\\\\.\\\\.)\\\\s*)?(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.operator.rest.ts\"},\"2\":{\"name\":\"punctuation.definition.binding-pattern.array.ts\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.binding-pattern.array.ts\"}},\"patterns\":[{\"include\":\"#binding-element-const\"},{\"include\":\"#punctuation-comma\"}]},\"array-literal\":{\"begin\":\"\\\\s*(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.brace.square.ts\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.square.ts\"}},\"name\":\"meta.array.literal.ts\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#punctuation-comma\"}]},\"arrow-function\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"storage.modifier.async.ts\"},\"2\":{\"name\":\"variable.parameter.ts\"}},\"match\":\"(?:(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))\\\\b(async)\\\\s+)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(?==>)\",\"name\":\"meta.arrow.ts\"},{\"begin\":\"(?:(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))\\\\b(async))?((?<![]!)}])\\\\s*(?=((<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<]|<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<]|<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\\\s*)?\\\\(\\\\s*(/\\\\*([^*]|(\\\\*[^/]))*\\\\*/\\\\s*)*((\\\\)\\\\s*:)|((\\\\.\\\\.\\\\.\\\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\\\s*:)))|((<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<]|<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<]|<\\\\s*(((const\\\\s+)?[$_[:alpha:]])|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\\\s*)?\\\\(\\\\s*(/\\\\*([^*]|(\\\\*[^/]))*\\\\*/\\\\s*)*(([$_[:alpha:]]|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\\\\.\\\\.\\\\.\\\\s*[$_[:alpha:]]))([^\\\"'()`]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|('([^'\\\\\\\\]|\\\\\\\\.)*')|(\\\"([^\\\"\\\\\\\\]|\\\\\\\\.)*\\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))*)?\\\\)(\\\\s*:\\\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\\\([^()]+\\\\)|\\\\{[^{}]+})+)?\\\\s*=>)))\",\"beginCaptures\":{\"1\":{\"name\":\"storage.modifier.async.ts\"}},\"end\":\"(?==>|\\\\{|^(\\\\s*(export|function|class|interface|let|var|\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[$_[:alpha:]])\\\\b|\\\\bawait\\\\s+\\\\busing(?=\\\\s+(?!in\\\\b|of\\\\b(?!\\\\s*(?:of\\\\b|=)))[$_[:alpha:]])\\\\b\\\\b|const|import|enum|namespace|module|type|abstract|declare)\\\\s+))\",\"name\":\"meta.arrow.ts\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#type-parameters\"},{\"incLine truncated
|
||||
|
||||
export default [
|
||||
...angular_expression,
|
||||
...angular_inline_style,
|
||||
...angular_inline_template,
|
||||
...angular_let_declaration,
|
||||
...angular_template,
|
||||
...angular_template_blocks,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Apache Conf\",\"fileTypes\":[\"conf\",\"CONF\",\"envvars\",\"htaccess\",\"HTACCESS\",\"htgroups\",\"HTGROUPS\",\"htpasswd\",\"HTPASSWD\",\".htaccess\",\".HTACCESS\",\".htgroups\",\".HTGROUPS\",\".htpasswd\",\".HTPASSWD\"],\"name\":\"apache\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"punctuation.definition.comment.apacheconf\"}},\"match\":\"^(\\\\s)*(#).*$\\\\n?\",\"name\":\"comment.line.hash.ini\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.apacheconf\"},\"2\":{\"name\":\"entity.tag.apacheconf\"},\"4\":{\"name\":\"string.value.apacheconf\"},\"5\":{\"name\":\"punctuation.definition.tag.apacheconf\"}},\"match\":\"(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(\\\\s(.+?))?(>)\"},{\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.apacheconf\"},\"2\":{\"name\":\"entity.tag.apacheconf\"},\"3\":{\"name\":\"punctuation.definition.tag.apacheconf\"}},\"match\":\"(</)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost|Macro|If|Else|ElseIf)(>)\"},{\"captures\":{\"3\":{\"name\":\"string.regexp.apacheconf\"},\"4\":{\"name\":\"string.replacement.apacheconf\"}},\"match\":\"(?<=(Rewrite(Rule|Cond)))\\\\s+(.+?)\\\\s+(.+?)($|\\\\s)\"},{\"captures\":{\"2\":{\"name\":\"entity.status.apacheconf\"},\"3\":{\"name\":\"string.regexp.apacheconf\"},\"5\":{\"name\":\"string.path.apacheconf\"}},\"match\":\"(?<=RedirectMatch)(\\\\s+(\\\\d\\\\d\\\\d|permanent|temp|seeother|gone))?\\\\s+(.+?)\\\\s+((.+?)($|\\\\s))?\"},{\"captures\":{\"2\":{\"name\":\"entity.status.apacheconf\"},\"3\":{\"name\":\"string.path.apacheconf\"},\"5\":{\"name\":\"string.path.apacheconf\"}},\"match\":\"(?<=Redirect)(\\\\s+(\\\\d\\\\d\\\\d|permanent|temp|seeother|gone))?\\\\s+(.+?)\\\\s+((.+?)($|\\\\s))?\"},{\"captures\":{\"1\":{\"name\":\"string.regexp.apacheconf\"},\"3\":{\"name\":\"string.path.apacheconf\"}},\"match\":\"(?<=(?:Script|)AliasMatch)\\\\s+(.+?)\\\\s+((.+?)\\\\s)?\"},{\"captures\":{\"1\":{\"name\":\"string.path.apacheconf\"},\"3\":{\"name\":\"string.path.apacheconf\"}},\"match\":\"(?<=RedirectPermanent|RedirectTemp|ScriptAlias|Alias)\\\\s+(.+?)\\\\s+((.+?)($|\\\\s))?\"},{\"captures\":{\"1\":{\"name\":\"keyword.core.apacheconf\"}},\"match\":\"\\\\b(AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|Define|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include(Optional)?|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|Mutex|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|Time([Oo])ut|TraceEnable|UseCanonicalName|Use|ErrorLogFormat|GlobalLog|PHPIniDir|SSLHonorCipherOrder|SSLCompression|SSLUseStapling|SSLStapling\\\\w+|SSLCARevocationCheck|SSLSRPVerifierFile|SSLSessionTickets|RequestReadTimeout|ProxyHTML\\\\w+|MaxRanges)\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.mpm.apacheconf\"}},\"match\":\"\\\\b(AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxConnectionsPerChild|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxRequestWorkers|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.access.apacheconf\"}},\"match\":\"\\\\b(Allow|Deny|Order)\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.actions.apacheconf\"}},\"match\":\"\\\\b(Action|Script)\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.alias.apacheconf\"}},\"match\":\"\\\\b(Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.auth.apacheconf\"}},\"match\":\"\\\\b(Auth(?:Authoritative|GroupFile|UserFile|BasicProvider|BasicFake|BasicAuthoritative|BasicUseDigestAlgorithm))\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.auth_anon.apacheconf\"}},\"match\":\"\\\\b(Anonymous(?:|_Authoritative|_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail))\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.auth_dbm.apacheconf\"}},\"match\":\"\\\\b(AuthDBM(?:Authoritative|GroupFile|Type|UserFile))\\\\b\"},{\"captures\":{\"1\":{\"name\":\"keyword.auth_digest.apacheconf\"}},\"match\":\"\\\\b(AuthDigest(?Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Apex\",\"fileTypes\":[\"apex\",\"cls\",\"trigger\"],\"name\":\"apex\",\"patterns\":[{\"include\":\"#javadoc-comment\"},{\"include\":\"#comment\"},{\"include\":\"#directives\"},{\"include\":\"#declarations\"},{\"include\":\"#script-top-level\"}],\"repository\":{\"annotation-declaration\":{\"begin\":\"(@[_[:alpha:]]+)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.annotation.apex\"}},\"end\":\"(?=\\\\s(?!\\\\())|(?=\\\\s*$)|(?<=\\\\s*\\\\))\",\"patterns\":[{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.open.apex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.close.apex\"}},\"patterns\":[{\"include\":\"#expression\"}]},{\"include\":\"#statement\"}]},\"argument-list\":{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.open.apex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.close.apex\"}},\"patterns\":[{\"include\":\"#named-argument\"},{\"include\":\"#expression\"},{\"include\":\"#punctuation-comma\"}]},\"array-creation-expression\":{\"begin\":\"\\\\b(new)\\\\b\\\\s*(?<type_name>(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\\\s*::\\\\s*)?(?<name_and_type_args>\\\\g<identifier>\\\\s*(?<type_args>\\\\s*<(?:[^<>]|\\\\g<type_args>)+>\\\\s*)?)(?:\\\\s*\\\\.\\\\s*\\\\g<name_and_type_args>)*(?:\\\\s*\\\\?\\\\s*)?(?:\\\\s*\\\\[(?:\\\\s*,\\\\s*)*]\\\\s*)*)?\\\\s*(?=\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.new.apex\"},\"2\":{\"patterns\":[{\"include\":\"#support-type\"},{\"include\":\"#type\"}]}},\"end\":\"(?<=])\",\"patterns\":[{\"include\":\"#bracketed-argument-list\"}]},\"block\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.curlybrace.open.apex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.curlybrace.close.apex\"}},\"patterns\":[{\"include\":\"#statement\"}]},\"boolean-literal\":{\"patterns\":[{\"match\":\"(?<!\\\\.)\\\\btrue\\\\b\",\"name\":\"constant.language.boolean.true.apex\"},{\"match\":\"(?<!\\\\.)\\\\bfalse\\\\b\",\"name\":\"constant.language.boolean.false.apex\"}]},\"bracketed-argument-list\":{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.squarebracket.open.apex\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.squarebracket.close.apex\"}},\"patterns\":[{\"include\":\"#soql-query-expression\"},{\"include\":\"#named-argument\"},{\"include\":\"#expression\"},{\"include\":\"#punctuation-comma\"}]},\"break-or-continue-statement\":{\"captures\":{\"1\":{\"name\":\"keyword.control.flow.break.apex\"},\"2\":{\"name\":\"keyword.control.flow.continue.apex\"}},\"match\":\"(?<!\\\\.)\\\\b(?:(break)|(continue))\\\\b\"},\"cast-expression\":{\"captures\":{\"1\":{\"name\":\"punctuation.parenthesis.open.apex\"},\"2\":{\"patterns\":[{\"include\":\"#support-type\"},{\"include\":\"#type\"}]},\"6\":{\"name\":\"punctuation.parenthesis.close.apex\"}},\"match\":\"(\\\\()\\\\s*(?<type_name>(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\\\s*::\\\\s*)?(?<name_and_type_args>\\\\g<identifier>\\\\s*(?<type_args>\\\\s*<(?:[^<>]|\\\\g<type_args>)+>\\\\s*)?)(?:\\\\s*\\\\.\\\\s*\\\\g<name_and_type_args>)*(?:\\\\s*\\\\?\\\\s*)?(?:\\\\s*\\\\[(?:\\\\s*,\\\\s*)*]\\\\s*)*)\\\\s*(\\\\))(?=\\\\s*@?[(_[:alnum:]])\"},\"catch-clause\":{\"begin\":\"(?<!\\\\.)\\\\b(catch)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.try.catch.apex\"}},\"end\":\"(?<=})\",\"patterns\":[{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.open.apex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.parenthesis.close.apex\"}},\"patterns\":[{\"captures\":{\"1\":{\"patterns\":[{\"include\":\"#support-type\"},{\"include\":\"#type\"}]},\"5\":{\"name\":\"entity.name.variable.local.apex\"}},\"match\":\"(?<type_name>(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\\\s*::\\\\s*)?(?<name_and_type_args>\\\\g<identifier>\\\\s*(?<type_args>\\\\s*<(?:[^<>]|\\\\g<type_args>)+>\\\\s*)?)(?:\\\\s*\\\\.\\\\s*\\\\g<name_and_type_args>)*(?:\\\\s*\\\\?\\\\s*)?(?:\\\\s*\\\\[(?:\\\\s*,\\\\s*)*]\\\\s*)*)\\\\s*(?:(\\\\g<identifier>)\\\\b)?\"}]},{\"include\":\"#comment\"},{\"include\":\"#block\"}]},\"class-declaration\":{\"begin\":\"(?=\\\\bclass\\\\b)\",\"end\":\"(?<=})\",\"patterns\":[{\"begin\":\"\\\\b(class)\\\\b\\\\s+(@?[_[:alpha:]][_[:alnum:]]*)\\\\s*\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.class.apex\"},\"2\":{\"name\":\"entity.name.type.class.apex\"}},\"end\":\"(?=\\\\{)\",\"patterns\":[{\"include\":\"#javadoc-comment\"},{\"include\":\"#comment\"},{\"include\":\"#type-parameter-list\"},{\"include\":\"#extends-class\"},{\"include\":\"#implements-class\"}]},{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.curlybrace.open.apex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.curlybrace.close.apex\"}},\"patterns\":[{\"include\":\"#class-or-trigger-members\"}]},{\"include\":\"#javadoc-commLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import html from './html.mjs'
|
||||
import xml from './xml.mjs'
|
||||
import css from './css.mjs'
|
||||
import javascript from './javascript.mjs'
|
||||
import json from './json.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"APL\",\"fileTypes\":[\"apl\",\"apla\",\"aplc\",\"aplf\",\"apli\",\"apln\",\"aplo\",\"dyalog\",\"dyapp\",\"mipage\"],\"firstLineMatch\":\"[⌶-⍺]|^#!.*(?:[/\\\\s]|(?<=!)\\\\b)(?:gnu[-._]?apl|aplx?|dyalog)(?:$|\\\\s)|(?i:-\\\\*-(?:\\\\s*(?=[^:;\\\\s]+\\\\s*-\\\\*-)|(?:.*?[;\\\\s]|(?<=-\\\\*-))mode\\\\s*:\\\\s*)apl(?=[;\\\\s]|(?<![-*])-\\\\*-).*?-\\\\*-|(?:(?:\\\\s|^)vi(?:m(?:[<=>]?\\\\d+|))?|\\\\sex)(?=:(?:(?=\\\\s*set?\\\\s[^\\\\n:]+:)|(?!\\\\s*set?\\\\s)))(?:(?:\\\\s|\\\\s*:\\\\s*)\\\\w*(?:\\\\s*=(?:[^\\\\n\\\\\\\\\\\\s]|\\\\\\\\.)*)?)*[:\\\\s](?:filetype|ft|syntax)\\\\s*=apl(?=[:\\\\s]|$))\",\"foldingStartMarker\":\"\\\\{\",\"foldingStopMarker\":\"}\",\"name\":\"apl\",\"patterns\":[{\"match\":\"\\\\A#!.*$\",\"name\":\"comment.line.shebang.apl\"},{\"include\":\"#heredocs\"},{\"include\":\"#main\"},{\"begin\":\"^\\\\s*((\\\\))OFF|(])NEXTFILE)\\\\b(.*)$\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.command.eof.apl\"},\"2\":{\"name\":\"punctuation.definition.command.apl\"},\"3\":{\"name\":\"punctuation.definition.command.apl\"},\"4\":{\"patterns\":[{\"include\":\"#comment\"}]}},\"contentName\":\"text.embedded.apl\",\"end\":\"(?=N)A\"},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.round.bracket.begin.apl\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.round.bracket.end.apl\"}},\"name\":\"meta.round.bracketed.group.apl\",\"patterns\":[{\"include\":\"#main\"}]},{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.square.bracket.begin.apl\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.square.bracket.end.apl\"}},\"name\":\"meta.square.bracketed.group.apl\",\"patterns\":[{\"include\":\"#main\"}]},{\"begin\":\"^\\\\s*((\\\\))\\\\S+)\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.command.apl\"},\"2\":{\"name\":\"punctuation.definition.command.apl\"}},\"end\":\"$\",\"name\":\"meta.system.command.apl\",\"patterns\":[{\"include\":\"#command-arguments\"},{\"include\":\"#command-switches\"},{\"include\":\"#main\"}]},{\"begin\":\"^\\\\s*((])\\\\S+)\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.command.apl\"},\"2\":{\"name\":\"punctuation.definition.command.apl\"}},\"end\":\"$\",\"name\":\"meta.user.command.apl\",\"patterns\":[{\"include\":\"#command-arguments\"},{\"include\":\"#command-switches\"},{\"include\":\"#main\"}]}],\"repository\":{\"class\":{\"patterns\":[{\"begin\":\"(?<=\\\\s|^)((:)Class)\\\\s+('[^']*'?|[A-Z_a-zÀ-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ][0-9A-Z_a-z¯À-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ]*)\\\\s*((:)\\\\s*(?:('[^']*'?|[A-Z_a-zÀ-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ][0-9A-Z_a-z¯À-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ]*)\\\\s*)?)?(.*?)$\",\"beginCaptures\":{\"0\":{\"name\":\"meta.class.apl\"},\"1\":{\"name\":\"keyword.control.class.apl\"},\"2\":{\"name\":\"punctuation.definition.class.apl\"},\"3\":{\"name\":\"entity.name.type.class.apl\",\"patterns\":[{\"include\":\"#strings\"}]},\"4\":{\"name\":\"entity.other.inherited-class.apl\"},\"5\":{\"name\":\"punctuation.separator.inheritance.apl\"},\"6\":{\"patterns\":[{\"include\":\"#strings\"}]},\"7\":{\"name\":\"entity.other.class.interfaces.apl\",\"patterns\":[{\"include\":\"#csv\"}]}},\"end\":\"(?<=\\\\s|^)((:)EndClass)(?=\\\\b)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.class.apl\"},\"2\":{\"name\":\"punctuation.definition.class.apl\"}},\"patterns\":[{\"begin\":\"(?<=\\\\s|^)(:)Field(?=\\\\s)\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.control.field.apl\"},\"1\":{\"name\":\"punctuation.definition.field.apl\"}},\"end\":\"\\\\s*(←.*)?(?:$|(?=⍝))\",\"endCaptures\":{\"0\":{\"name\":\"entity.other.initial-value.apl\"},\"1\":{\"patterns\":[{\"include\":\"#main\"}]}},\"name\":\"meta.field.apl\",\"patterns\":[{\"match\":\"(?<=\\\\s|^)Public(?=\\\\s|$)\",\"name\":\"storage.modifier.access.public.apl\"},{\"match\":\"(?<=\\\\s|^)Private(?=\\\\s|$)\",\"name\":\"storage.modifier.access.private.apl\"},{\"match\":\"(?<=\\\\s|^)Shared(?=\\\\s|$)\",\"name\":\"storage.modifier.shared.apl\"},{\"match\":\"(?<=\\\\s|^)Instance(?=\\\\s|$)\",\"name\":\"storage.modifier.instance.apl\"},{\"match\":\"(?<=\\\\s|^)ReadOnly(?=\\\\s|$)\",\"name\":\"storage.modifier.readonly.apl\"},{\"captures\":{\"1\":{\"patterns\":[{\"include\":\"#strings\"}]}},\"match\":\"('[^']*'?|[A-Z_a-zÀ-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ][0-9A-Z_a-z¯À-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ]*)\",\"name\":\"entity.name.type.apl\"}]},{\"include\":\"$self\"}]}]},\"command-arguments\":{\"patterns\":[{\"begin\":\"\\\\b(?=\\\\S)\",\"end\":\"\\\\b(?=\\\\s)\",\"name\":\"variable.parameter.argument.apl\",\"patterns\":[{\"include\":\"#main\"}]}]},\"command-switches\":{\"patterns\":[{\"begin\":\"(?<=\\\\s)(-)([A-Z_a-zÀ-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ][0-9A-Z_a-z¯À-ÖØ-Ýß-öø-üþ∆⍙Ⓐ-Ⓩ]*)(=)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.delimiter.switch.apl\"},\"2\":{\"name\":\"entity.name.switch.apl\"},\"3\":{\"name\":\"punctuation.assignment.switch.Line truncated
|
||||
|
||||
export default [
|
||||
...html,
|
||||
...xml,
|
||||
...css,
|
||||
...javascript,
|
||||
...json,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"AppleScript\",\"fileTypes\":[\"applescript\",\"scpt\",\"script editor\"],\"firstLineMatch\":\"^#!.*(osascript)\",\"name\":\"applescript\",\"patterns\":[{\"include\":\"#blocks\"},{\"include\":\"#inline\"}],\"repository\":{\"attributes.considering-ignoring\":{\"patterns\":[{\"match\":\",\",\"name\":\"punctuation.separator.array.attributes.applescript\"},{\"match\":\"\\\\b(and)\\\\b\",\"name\":\"keyword.control.attributes.and.applescript\"},{\"match\":\"\\\\b(?i:case|diacriticals|hyphens|numeric\\\\s+strings|punctuation|white\\\\s+space)\\\\b\",\"name\":\"constant.other.attributes.text.applescript\"},{\"match\":\"\\\\b(?i:application\\\\s+responses)\\\\b\",\"name\":\"constant.other.attributes.application.applescript\"}]},\"blocks\":{\"patterns\":[{\"begin\":\"^\\\\s*(script)\\\\s+(\\\\w+)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.script.applescript\"},\"2\":{\"name\":\"entity.name.type.script-object.applescript\"}},\"end\":\"^\\\\s*(end(?:\\\\s+script)?)(?=\\\\s*(--.*?)?$)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.script.applescript\"}},\"name\":\"meta.block.script.applescript\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"^\\\\s*(to|on)\\\\s+(\\\\w+)(\\\\()((?:[,:{}\\\\s]*\\\\w+{0,1})*)(\\\\))\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"},\"2\":{\"name\":\"entity.name.function.handler.applescript\"},\"3\":{\"name\":\"punctuation.definition.parameters.begin.applescript\"},\"4\":{\"name\":\"variable.parameter.handler.applescript\"},\"5\":{\"name\":\"punctuation.definition.parameters.end.applescript\"}},\"end\":\"^\\\\s*(end)(?:\\\\s+(\\\\2))?(?=\\\\s*(--.*?)?$)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"}},\"name\":\"meta.function.positional.applescript\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"^\\\\s*(to|on)\\\\s+(\\\\w+)(?:\\\\s+(of|in)\\\\s+(\\\\w+))?(?=\\\\s+(above|against|apart\\\\s+from|around|aside\\\\s+from|at|below|beneath|beside|between|by|for|from|instead\\\\s+of|into|on|onto|out\\\\s+of|over|thru|under)\\\\b)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"},\"2\":{\"name\":\"entity.name.function.handler.applescript\"},\"3\":{\"name\":\"keyword.control.function.applescript\"},\"4\":{\"name\":\"variable.parameter.handler.direct.applescript\"}},\"end\":\"^\\\\s*(end)(?:\\\\s+(\\\\2))?(?=\\\\s*(--.*?)?$)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"}},\"name\":\"meta.function.prepositional.applescript\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.preposition.applescript\"},\"2\":{\"name\":\"variable.parameter.handler.applescript\"}},\"match\":\"\\\\b(?i:above|against|apart\\\\s+from|around|aside\\\\s+from|at|below|beneath|beside|between|by|for|from|instead\\\\s+of|into|on|onto|out\\\\s+of|over|thru|under)\\\\s+(\\\\w+)\\\\b\"},{\"include\":\"$self\"}]},{\"begin\":\"^\\\\s*(to|on)\\\\s+(\\\\w+)(?=\\\\s*(--.*?)?$)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"},\"2\":{\"name\":\"entity.name.function.handler.applescript\"}},\"end\":\"^\\\\s*(end)(?:\\\\s+(\\\\2))?(?=\\\\s*(--.*?)?$)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.control.function.applescript\"}},\"name\":\"meta.function.parameterless.applescript\",\"patterns\":[{\"include\":\"$self\"}]},{\"include\":\"#blocks.tell\"},{\"include\":\"#blocks.repeat\"},{\"include\":\"#blocks.statement\"},{\"include\":\"#blocks.other\"}]},\"blocks.other\":{\"patterns\":[{\"begin\":\"^\\\\s*(considering)\\\\b\",\"end\":\"^\\\\s*(end(?:\\\\s+considering)?)(?=\\\\s*(--.*?)?$)\",\"name\":\"meta.block.considering.applescript\",\"patterns\":[{\"begin\":\"(?<=considering)\",\"end\":\"(?<!¬)$\",\"name\":\"meta.array.attributes.considering.applescript\",\"patterns\":[{\"include\":\"#attributes.considering-ignoring\"}]},{\"begin\":\"(?<=ignoring)\",\"end\":\"(?<!¬)$\",\"name\":\"meta.array.attributes.ignoring.applescript\",\"patterns\":[{\"include\":\"#attributes.considering-ignoring\"}]},{\"match\":\"\\\\b(but)\\\\b\",\"name\":\"keyword.control.but.applescript\"},{\"include\":\"$self\"}]},{\"begin\":\"^\\\\s*(ignoring)\\\\b\",\"end\":\"^\\\\s*(end(?:\\\\s+ignoring)?)(?=\\\\s*(--.*?)?$)\",\"name\":\"meta.block.ignoring.applescript\",\"patterns\":[{\"begin\":\"(?<=considering)\",\"end\":\"(?<!¬)$\",\"name\":\"meta.array.attributes.considering.applescript\",\"patterns\":[{\"include\":\"#attributes.considering-ignoring\"}]},{\"begin\":\"(?<=ignoring)\",\"end\":\"(?<!¬)$\",\"name\":\"meta.array.attributes.ignoring.applescript\",\"patterns\":[{\"include\":\"#attributes.considering-ignoring\"}]},{\"match\":\"\\\\b(but)\\\\b\",\"name\":\"keyword.control.but.applescript\"},{\"include\":\"$self\"}]},{\"begin\":\"^\\\\s*(if)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.if.applescript\"}},\"end\":\"^\\\\s*(end(?:\\\\s+if)?)(?=\\\\s*(--.*?)?$)\",\"endCaptures\":{\"1\":{\"name\":\"keyword.contLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Ara\",\"fileTypes\":[\"ara\"],\"name\":\"ara\",\"patterns\":[{\"include\":\"#namespace\"},{\"include\":\"#named-arguments\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#strings\"},{\"include\":\"#numbers\"},{\"include\":\"#operators\"},{\"include\":\"#type\"},{\"include\":\"#function-call\"}],\"repository\":{\"class-name\":{\"patterns\":[{\"begin\":\"\\\\b(?i)(?<!\\\\$)(?=[A-Z\\\\\\\\_a-z])\",\"end\":\"(?i)([_a-z][0-9_a-z]*)?(?=[^0-9\\\\\\\\_a-z])\\\\b\",\"endCaptures\":{\"1\":{\"name\":\"support.class.ara\"}},\"patterns\":[{\"include\":\"#namespace\"}]}]},\"comments\":{\"patterns\":[{\"begin\":\"/\\\\*\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.ara\"}},\"end\":\"\\\\*/\",\"name\":\"comment.block.ara\"},{\"begin\":\"(^[\\\\t ]+)?(?=//)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.whitespace.comment.leading.ara\"}},\"end\":\"(?!\\\\G)\",\"patterns\":[{\"begin\":\"//\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.ara\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.double-slash.ara\"}]}]},\"function-call\":{\"patterns\":[{\"begin\":\"(?i)(?=\\\\\\\\?[0-9\\\\\\\\_a-z]+\\\\\\\\[_a-z][0-9_a-z]*\\\\s*(\\\\(|(::<)))\",\"end\":\"(?=\\\\s*(\\\\(|(::<)))\",\"patterns\":[{\"include\":\"#user-function-call\"}]},{\"begin\":\"(?i)(\\\\\\\\)?(?=\\\\b[_a-z][0-9_a-z]*\\\\s*(\\\\(|(::<)))\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.separator.inheritance.php\"}},\"end\":\"(?=\\\\s*(\\\\(|(::<)))\",\"patterns\":[{\"include\":\"#user-function-call\"}]}]},\"interpolation\":{\"patterns\":[{\"match\":\"\\\\\\\\[0-7]{1,3}\",\"name\":\"constant.numeric.octal.ara\"},{\"match\":\"\\\\\\\\x\\\\h{1,2}\",\"name\":\"constant.numeric.hex.ara\"},{\"match\":\"\\\\\\\\[\\\"$\\\\\\\\nrt]\",\"name\":\"constant.character.escape.ara\"}]},\"keywords\":{\"patterns\":[{\"match\":\"\\\\b(await|async|concurrently|break|continue|do|else|elseif|for|if|loop|while|foreach|match|return|try|yield|from|catch|finally|default|exit)\\\\b\",\"name\":\"keyword.control.ara\"},{\"match\":\"\\\\b(const|enum|class|interface|trait|namespace|type|case|function|fn)\\\\b\",\"name\":\"storage.decl.ara\"},{\"match\":\"\\\\b(final|abstract|static|readonly|public|private|protected)\\\\b\",\"name\":\"storage.modifier.ara\"},{\"match\":\"\\\\b(as|is|extends|implements|use|where|clone|new)\\\\b\",\"name\":\"keyword.other.ara\"}]},\"named-arguments\":{\"captures\":{\"1\":{\"name\":\"entity.name.variable.parameter.ara\"},\"2\":{\"name\":\"punctuation.separator.colon.ara\"}},\"match\":\"(?i)(?<=^|[(,])\\\\s*([_a-z\\\\x7F-\\\\x{10FFFF}][0-9_a-z\\\\x7F-\\\\x{10FFFF}]*)\\\\s*(:)(?!:)\"},\"namespace\":{\"begin\":\"(?i)((namespace)|[0-9_a-z]+)?(\\\\\\\\)(?=.*?[^0-9\\\\\\\\_a-z])\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.type.namespace.php\"},\"3\":{\"name\":\"punctuation.separator.inheritance.php\"}},\"end\":\"(?i)(?=[0-9_a-z]*[^0-9\\\\\\\\_a-z])\",\"name\":\"support.other.namespace.php\",\"patterns\":[{\"match\":\"(?i)[0-9_a-z]+(?=\\\\\\\\)\",\"name\":\"entity.name.type.namespace.php\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.inheritance.php\"}},\"match\":\"(?i)(\\\\\\\\)\"}]},\"numbers\":{\"patterns\":[{\"match\":\"0[Xx]\\\\h+(?:_\\\\h+)*\",\"name\":\"constant.numeric.hex.ara\"},{\"match\":\"0[Bb][01]+(?:_[01]+)*\",\"name\":\"constant.numeric.binary.ara\"},{\"match\":\"0[Oo][0-7]+(?:_[0-7]+)*\",\"name\":\"constant.numeric.octal.ara\"},{\"match\":\"0(?:_?[0-7]+)+\",\"name\":\"constant.numeric.octal.ara\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.decimal.period.ara\"},\"2\":{\"name\":\"punctuation.separator.decimal.period.ara\"}},\"match\":\"(?:[0-9]+(?:_[0-9]+)*)?(\\\\.)[0-9]+(?:_[0-9]+)*(?:[Ee][-+]?[0-9]+(?:_[0-9]+)*)?|[0-9]+(?:_[0-9]+)*(\\\\.)(?:[0-9]+(?:_[0-9]+)*)?(?:[Ee][-+]?[0-9]+(?:_[0-9]+)*)?|[0-9]+(?:_[0-9]+)*[Ee][-+]?[0-9]+(?:_[0-9]+)*\",\"name\":\"constant.numeric.decimal.ara\"},{\"match\":\"0|[1-9](?:_?[0-9]+)*\",\"name\":\"constant.numeric.decimal.ara\"}]},\"operators\":{\"patterns\":[{\"match\":\"((?:[-%*+/^]|&&|[\\\\&<>|]|<<|>>|\\\\?\\\\?)=)\",\"name\":\"keyword.assignments.ara\"},{\"match\":\"([\\\\^|]|\\\\|\\\\||&&|>>|<<|[\\\\&~]|<<|>>|[<>]|<=>|\\\\?\\\\?|[:?]|\\\\?:)(?!=)\",\"name\":\"keyword.operators.ara\"},{\"match\":\"(===??|!==?|<=|>=|[<>])(?!=)\",\"name\":\"keyword.operator.comparison.ara\"},{\"match\":\"(([%+]|(\\\\*(?!\\\\w)))(?!=))|(-(?!>))|(/(?!/))\",\"name\":\"keyword.operator.math.ara\"},{\"match\":\"(?<![<>])=(?![=>])\",\"name\":\"keyword.operator.assignment.ara\"},{\"captures\":{\"1\":{\"name\":\"punctuation.brackets.round.ara\"},\"2\":{\"name\":\"punctuation.brackets.square.ara\"},\"3\":{\"name\":\"punctuation.brackets.curly.ara\"},\"4\":{\"name\":\"keyword.operator.comparison.ara\"},\"5\":{\"name\":\"punctuation.brackets.round.ara\"},\"6\":{\"name\":\"punctuation.brackets.square.ara\"},\"7\":{\"name\":\"punctuation.brackets.curly.ara\"}},\"match\":\"(?:\\\\b|(?:(\\\\))|(])|(}Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"AsciiDoc\",\"fileTypes\":[\"ad\",\"asc\",\"adoc\",\"asciidoc\",\"adoc.txt\"],\"name\":\"asciidoc\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#callout-list-item\"},{\"include\":\"#titles\"},{\"include\":\"#attribute-entry\"},{\"include\":\"#blocks\"},{\"include\":\"#block-title\"},{\"include\":\"#tables\"},{\"include\":\"#horizontal-rule\"},{\"include\":\"#list\"},{\"include\":\"#inlines\"},{\"include\":\"#block-attribute\"},{\"include\":\"#line-break\"}],\"repository\":{\"admonition-paragraph\":{\"patterns\":[{\"begin\":\"(?=(?>^\\\\[(NOTE|TIP|IMPORTANT|WARNING|CAUTION)([#%,.][^]]+)*]$))\",\"end\":\"((?<=--|====)|^\\\\p{blank}*)$\",\"name\":\"markup.admonition.asciidoc\",\"patterns\":[{\"captures\":{\"0\":{\"patterns\":[{\"include\":\"#block-attribute-inner\"}]}},\"match\":\"^\\\\[(NOTE|TIP|IMPORTANT|WARNING|CAUTION)([#%,.]([^],]+))*]$\"},{\"include\":\"#inlines\"},{\"include\":\"#block-title\"},{\"begin\":\"^(={4,})\\\\s*$\",\"end\":\"(?<=\\\\1)\",\"patterns\":[{\"include\":\"#inlines\"},{\"include\":\"#list\"}]},{\"begin\":\"^(-{2})\\\\s*$\",\"end\":\"(?<=\\\\1)\",\"patterns\":[{\"include\":\"#inlines\"},{\"include\":\"#list\"}]}]},{\"begin\":\"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\\\p{blank}+\",\"captures\":{\"1\":{\"name\":\"entity.name.function.asciidoc\"}},\"end\":\"^\\\\p{blank}*$\",\"name\":\"markup.admonition.asciidoc\",\"patterns\":[{\"include\":\"#inlines\"}]}]},\"anchor-macro\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"support.constant.asciidoc\"},\"2\":{\"name\":\"markup.blockid.asciidoc\"},\"3\":{\"name\":\"string.unquoted.asciidoc\"},\"4\":{\"name\":\"support.constant.asciidoc\"}},\"match\":\"(?<!\\\\\\\\)(\\\\[{2})([:_[:alpha:]][-.:[:word:]]*)(?:,\\\\p{blank}*(\\\\S.*?))?(]{2})\",\"name\":\"markup.other.anchor.asciidoc\"},{\"captures\":{\"1\":{\"name\":\"entity.name.function.asciidoc\"},\"2\":{\"name\":\"markup.blockid.asciidoc\"},\"3\":{\"name\":\"string.unquoted.asciidoc\"}},\"match\":\"(?<!\\\\\\\\)(anchor):(\\\\S+)\\\\[(.*?[^\\\\\\\\])?]\",\"name\":\"markup.other.anchor.asciidoc\"}]},\"attribute-entry\":{\"patterns\":[{\"begin\":\"^(:)(!?\\\\w.*?)(:)(\\\\p{blank}+.+\\\\p{blank}[+\\\\\\\\])$\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.separator.attribute-entry.asciidoc\"},\"2\":{\"name\":\"support.constant.attribute-name.asciidoc\"},\"3\":{\"name\":\"punctuation.separator.attribute-entry.asciidoc\"},\"4\":{\"name\":\"string.unquoted.attribute-value.asciidoc\",\"patterns\":[{\"include\":\"#inlines\"},{\"include\":\"#hard-break-backslash\"},{\"include\":\"#line-break\"},{\"include\":\"#line-break-backslash\"}]}},\"contentName\":\"string.unquoted.attribute-value.asciidoc\",\"end\":\"^(?:\\\\p{blank}+.+$(?<![+\\\\\\\\])|\\\\p{blank}*$)\",\"endCaptures\":{\"0\":{\"name\":\"string.unquoted.attribute-value.asciidoc\"}},\"name\":\"meta.definition.attribute-entry.asciidoc\",\"patterns\":[{\"include\":\"#inlines\"},{\"include\":\"#hard-break-backslash\"},{\"include\":\"#line-break\"},{\"include\":\"#line-break-backslash\"}]},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.asciidoc\"},\"2\":{\"name\":\"support.constant.attribute-name.asciidoc\"},\"3\":{\"name\":\"punctuation.separator.asciidoc\"},\"4\":{\"name\":\"string.unquoted.attribute-value.asciidoc\",\"patterns\":[{\"include\":\"#inlines\"},{\"include\":\"#line-break\"}]}},\"match\":\"^(:)(!?\\\\w.*?)(:)(\\\\p{blank}+(.*))?$\",\"name\":\"meta.definition.attribute-entry.asciidoc\"}]},\"attribute-reference\":{\"patterns\":[{\"captures\":{\"2\":{\"name\":\"entity.name.function.asciidoc\"},\"3\":{\"name\":\"punctuation.separator.asciidoc\"},\"4\":{\"name\":\"support.constant.attribute-name.asciidoc\"},\"6\":{\"name\":\"punctuation.separator.asciidoc\"},\"7\":{\"name\":\"string.unquoted.attribute-value.asciidoc\"}},\"match\":\"(?<!\\\\\\\\)(\\\\{)(set|counter2?)(:)([-!_[:alnum:]]+)((:)(.*?))?(?<!\\\\\\\\)(})\",\"name\":\"markup.substitution.attribute-reference.asciidoc\"},{\"match\":\"(?<!\\\\\\\\)(\\\\{)(\\\\w+(?:-\\\\w+)*)(?<!\\\\\\\\)(})\",\"name\":\"markup.substitution.attribute-reference.asciidoc\"}]},\"bibliography-anchor\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"support.constant.asciidoc\"},\"2\":{\"name\":\"markup.biblioref.asciidoc\"},\"3\":{\"name\":\"support.constant.asciidoc\"}},\"match\":\"(?<!\\\\\\\\)(\\\\[{3})([:[:word:]][-.:[:word:]]*?)(]{3})\",\"name\":\"bibliography-anchor.asciidoc\"}]},\"bibtex-macro\":{\"patterns\":[{\"begin\":\"(?<!\\\\\\\\)(citenp:)([,a-z]*)(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.asciidoc\"},\"2\":{\"name\":\"markup.meta.attribute-list.asciidoc\"}},\"contentName\":\"string.unquoted.asciidoc\",\"end\":\"]|^$\",\"name\":\"markup.macro.inline.bibtex.asciidoc\"}]},\"block-attribute\":{\"patterns\":[{\"captures\":{\"0\":{\"patterns\":[{\"include\":\"#block-attribute-inner\"}]}},\"match\":\"^\\\\[(|\\\\p{blank}*[\\\"#%',.{[:word:]].*)]$\",\"name\":\"markup.heading.block-attribute.asciidLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Assembly\",\"fileTypes\":[\"asm\",\"nasm\",\"yasm\",\"inc\",\"s\"],\"name\":\"asm\",\"patterns\":[{\"include\":\"#registers\"},{\"include\":\"#mnemonics\"},{\"include\":\"#constants\"},{\"include\":\"#entities\"},{\"include\":\"#support\"},{\"include\":\"#comments\"},{\"include\":\"#preprocessor\"},{\"include\":\"#strings\"}],\"repository\":{\"comments\":{\"patterns\":[{\"match\":\"(;|(^|\\\\s)#\\\\s).*$\",\"name\":\"comment.line\"},{\"begin\":\"/\\\\*\",\"end\":\"\\\\*/\",\"name\":\"comment.block\"},{\"begin\":\"^\\\\s*[#%]\\\\s*if\\\\s+0\\\\b\",\"end\":\"^\\\\s*[#%]\\\\s*endif\\\\b\",\"name\":\"comment.preprocessor\"}]},\"constants\":{\"patterns\":[{\"match\":\"(?i)\\\\b0[by][01][01_]*\\\\.(?:(?:[01][01_]*)?(?:p[-+]?[0-9][0-9_]*)?\\\\b)?\",\"name\":\"constant.numeric.binary.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b0[by][01][01_]*p[-+]?[0-9][0-9_]*\\\\b\",\"name\":\"constant.numeric.binary.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b0[oq][0-7][0-7_]*\\\\.(?:(?:[0-7][0-7_]*)?(?:p[-+]?[0-9][0-9_]*)?\\\\b)?\",\"name\":\"constant.numeric.octal.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b0[oq][0-7][0-7_]*p[-+]?[0-9][0-9_]*\\\\b\",\"name\":\"constant.numeric.octal.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b(?:0[dt])?[0-9][0-9_]*\\\\.(?:(?:[0-9][0-9_]*)?(?:e[-+]?[0-9][0-9_]*)?\\\\b)?\",\"name\":\"constant.numeric.decimal.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b[0-9][0-9_]*e[-+]?[0-9][0-9_]*\\\\b\",\"name\":\"constant.numeric.decimal.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b[0-9][0-9_]*p(?:[0-9][0-9_]*)?\\\\b\",\"name\":\"constant.numeric.decimal.packed-bcd.asm.x86_64\"},{\"match\":\"(?i)\\\\b0[hx]\\\\h[_\\\\h]*\\\\.(?:(?:\\\\h[_\\\\h]*)?(?:p[-+]?[0-9][0-9_]*)?\\\\b)?\",\"name\":\"constant.numeric.hex.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b0[hx]\\\\h[_\\\\h]*p[-+]?[0-9][0-9_]*\\\\b\",\"name\":\"constant.numeric.hex.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\$[0-9]_?(?:\\\\h[_\\\\h]*)?\\\\.(?:(?:\\\\h[_\\\\h]*)?(?:p[-+]?[0-9][0-9_]*)?\\\\b)?\",\"name\":\"constant.numeric.hex.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\$[0-9]_?\\\\h[_\\\\h]*p[-+]?[0-9][0-9_]*\\\\b\",\"name\":\"constant.numeric.hex.floating-point.asm.x86_64\"},{\"match\":\"(?i)\\\\b(?:0[by][01][01_]*|[01][01_]*[by])\\\\b\",\"name\":\"constant.numeric.binary.asm.x86_64\"},{\"match\":\"(?i)\\\\b(?:0[oq][0-7][0-7_]*|[0-7][0-7_]*[oq])\\\\b\",\"name\":\"constant.numeric.octal.asm.x86_64\"},{\"match\":\"(?i)\\\\b(?:0[dt][0-9][0-9_]*|[0-9][0-9_]*[dt]?)\\\\b\",\"name\":\"constant.numeric.decimal.asm.x86_64\"},{\"match\":\"(?i)\\\\$[0-9]_?(?:\\\\h[_\\\\h]*)?\\\\b\",\"name\":\"constant.numeric.hex.asm.x86_64\"},{\"match\":\"(?i)\\\\b(?:0[hx]\\\\h[_\\\\h]*|\\\\h[_\\\\h]*[HXhx])\\\\b\",\"name\":\"constant.numeric.hex.asm.x86_64\"}]},\"entities\":{\"patterns\":[{\"match\":\"((se(?:ction|gment))\\\\s+)?\\\\.((ro)?data|bss|text)\",\"name\":\"entity.name.section\"},{\"match\":\"^\\\\.?(globa?l|extern|required)\\\\b\",\"name\":\"entity.directive\"},{\"match\":\"(\\\\$\\\\w+)\\\\b\",\"name\":\"text.variable\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64\"},\"2\":{\"name\":\"entity.name.function.special.asm.x86_64\"},\"3\":{\"name\":\"punctuation.separator.asm.x86_64\"}},\"match\":\"(\\\\.\\\\.@)([?_[:alpha:]][#$.?@_~[:alnum:]]*)(?:(:)?|\\\\b)\",\"name\":\"entity.name.function.asm.x86_64\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64\"},\"2\":{\"name\":\"entity.name.function.asm.x86_64\"},\"3\":{\"name\":\"punctuation.separator.asm.x86_64\"}},\"match\":\"(?:(\\\\.)?|\\\\b)([?_[:alpha:]][#$.?@_~[:alnum:]]*)(:)\",\"name\":\"entity.name.function.asm.x86_64\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64\"},\"2\":{\"name\":\"entity.name.function.asm.x86_64\"},\"3\":{\"name\":\"punctuation.separator.asm.x86_64\"}},\"match\":\"(\\\\.)([0-9]+[#$.?@_~[:alnum:]]*)(?:(:)?|\\\\b)\",\"name\":\"entity.name.function.asm.x86_64\"},{\"captures\":{\"1\":{\"name\":\"punctuation.separator.asm.x86_64 storage.modifier.asm.x86_64\"},\"2\":{\"name\":\"invalid.illegal.entity.name.function.asm.x86_64\"},\"3\":{\"name\":\"punctuation.separator.asm.x86_64\"}},\"match\":\"(?:(\\\\.)?|\\\\b)([$0-9@~][#$.?@_~[:alnum:]]*)(:)\",\"name\":\"invalid.illegal.entity.name.function.asm.x86_64\"}]},\"mnemonics\":{\"patterns\":[{\"include\":\"#mnemonics-general-purpose\"},{\"include\":\"#mnemonics-fpu\"},{\"include\":\"#mnemonics-mmx\"},{\"include\":\"#mnemonics-sse\"},{\"include\":\"#mnemonics-sse2\"},{\"include\":\"#mnemonics-sse3\"},{\"include\":\"#mnemonics-sse4\"},{\"include\":\"#mnemonics-aesni\"},{\"include\":\"#mnemonics-avx\"},{\"include\":\"#mnemonics-avx2\"},{\"include\":\"#mnemonics-tsx\"},{\"include\":\"#mnemonics-sha\"},{\"include\":\"#mnemonics-avx512\"},{\"include\":\"#mnemonics-system\"},{\"include\":\"#mnemonicLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import json from './json.mjs'
|
||||
import javascript from './javascript.mjs'
|
||||
import typescript from './typescript.mjs'
|
||||
import css from './css.mjs'
|
||||
import postcss from './postcss.mjs'
|
||||
import tsx from './tsx.mjs'
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Astro\",\"fileTypes\":[\"astro\"],\"injections\":{\"L:(meta.script.astro) (meta.lang.js | meta.lang.javascript | meta.lang.partytown | meta.lang.node) - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.js\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.js\"}]}]},\"L:(meta.script.astro) (meta.lang.json) - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.json\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.json\"}]}]},\"L:(meta.script.astro) (meta.lang.ts | meta.lang.typescript) - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.ts\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.ts\"}]}]},\"L:meta.script.astro - meta.lang - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.js\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.js\"}]}]},\"L:meta.style.astro - meta.lang - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.css\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.css\"}]}]},\"L:meta.style.astro meta.lang.css - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.css\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.css\"}]}]},\"L:meta.style.astro meta.lang.less - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.css.less\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.css.less\"}]}]},\"L:meta.style.astro meta.lang.postcss - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.css.postcss\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.css.postcss\"}]}]},\"L:meta.style.astro meta.lang.sass - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.sass\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.sass\"}]}]},\"L:meta.style.astro meta.lang.scss - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.css.scss\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.css.scss\"}]}]},\"L:meta.style.astro meta.lang.stylus - (meta source)\":{\"patterns\":[{\"begin\":\"(?<=>)(?!</)\",\"contentName\":\"source.stylus\",\"end\":\"(?=</)\",\"name\":\"meta.embedded.block.astro\",\"patterns\":[{\"include\":\"source.stylus\"}]}]}},\"name\":\"astro\",\"patterns\":[{\"include\":\"#scope\"},{\"include\":\"#frontmatter\"},{\"include\":\"#text\"}],\"repository\":{\"attribute-literal\":{\"begin\":\"(`)\",\"end\":\"\\\\1\",\"name\":\"string.template.astro\",\"patterns\":[{\"include\":\"source.tsx#template-substitution-element\"},{\"include\":\"source.tsx#string-character-escape\"}]},\"attributes\":{\"patterns\":[{\"include\":\"#attributes-events\"},{\"include\":\"#attributes-keyvalue\"},{\"include\":\"#attributes-interpolated\"}]},\"attributes-events\":{\"begin\":\"(on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o((?:n|ff)line)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d((?:|meta)data)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur)))(?![-:\\\\\\\\w])\",\"beginCaptures\":{\"0\":{\"patterns\":[{\"match\":\".*\",\"name\":\"entity.other.attribute-name.astro\"}]}},\"end\":\"(?=\\\\s*+[^=\\\\s])\",\"name\":\"meta.attribute.$1.astro\",\"patterns\":[{\"begin\":\"=\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.separator.key-value.astro\"}},\"end\":\"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)\",\"patterns\":[{\"include\":\"#interpolation\"},{\"include\":\"#attribute-literal\"},{\"begin\":\"(?=[^/<=>`\\\\s]|/(?!>))\",\"end\":\"(?!\\\\G)\",\"name\":\"meta.embedded.line.js\",\"patterns\":[{\"captures\":{\"0\":{\"name\":\"source.js\"},\"1\":{\"patterns\":[{\"include\":\"source.js\"}]}},\"match\":\"(([^\\\"'/<=>`\\\\s]|/(?!>))+)\",\"name\":\"string.unquoted.astro\"},{\"begin\":\"(\\\")\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.astro\"}},\"end\":\"\\\\1\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.astro\"}},\"name\":\"string.quoted.astro\",\"patterns\":[{\"captures\":{\"0\":{\"patterns\Line truncated
|
||||
|
||||
export default [
|
||||
...json,
|
||||
...javascript,
|
||||
...typescript,
|
||||
...css,
|
||||
...postcss,
|
||||
...tsx,
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"AWK\",\"fileTypes\":[\"awk\"],\"name\":\"awk\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#procedure\"},{\"include\":\"#pattern\"}],\"repository\":{\"builtin-pattern\":{\"match\":\"\\\\b(BEGINFILE|BEGIN|ENDFILE|END)\\\\b\",\"name\":\"constant.language.awk\"},\"command\":{\"patterns\":[{\"match\":\"\\\\b(?:next|printf??)\\\\b\",\"name\":\"keyword.other.command.awk\"},{\"match\":\"\\\\b(?:close|getline|delete|system)\\\\b\",\"name\":\"keyword.other.command.nawk\"},{\"match\":\"\\\\b(?:fflush|nextfile)\\\\b\",\"name\":\"keyword.other.command.bell-awk\"}]},\"comment\":{\"match\":\"#.*\",\"name\":\"comment.line.number-sign.awk\"},\"constant\":{\"patterns\":[{\"include\":\"#numeric-constant\"},{\"include\":\"#string-constant\"}]},\"escaped-char\":{\"match\":\"\\\\\\\\(?:[\\\"/\\\\\\\\abfnrtv]|x\\\\h{2}|[0-7]{3})\",\"name\":\"constant.character.escape.awk\"},\"expression\":{\"patterns\":[{\"include\":\"#command\"},{\"include\":\"#function\"},{\"include\":\"#constant\"},{\"include\":\"#variable\"},{\"include\":\"#regexp-in-expression\"},{\"include\":\"#operator\"},{\"include\":\"#groupings\"}]},\"function\":{\"patterns\":[{\"match\":\"\\\\b(?:exp|int|log|sqrt|index|length|split|sprintf|substr)\\\\b\",\"name\":\"support.function.awk\"},{\"match\":\"\\\\b(?:atan2|cos|rand|sin|srand|gsub|match|sub|tolower|toupper)\\\\b\",\"name\":\"support.function.nawk\"},{\"match\":\"\\\\b(?:gensub|strftime|systime)\\\\b\",\"name\":\"support.function.gawk\"}]},\"function-definition\":{\"begin\":\"\\\\b(function)\\\\s+(\\\\w+)(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.function.awk\"},\"2\":{\"name\":\"entity.name.function.awk\"},\"3\":{\"name\":\"punctuation.definition.parameters.begin.awk\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.awk\"}},\"patterns\":[{\"match\":\"\\\\b(\\\\w+)\\\\b\",\"name\":\"variable.parameter.function.awk\"},{\"match\":\"\\\\b(,)\\\\b\",\"name\":\"punctuation.separator.parameters.awk\"}]},\"groupings\":{\"patterns\":[{\"match\":\"\\\\(\",\"name\":\"meta.brace.round.awk\"},{\"match\":\"\\\\)\",\"name\":\"meta.brace.round.awk\"},{\"match\":\",\",\"name\":\"punctuation.separator.parameters.awk\"}]},\"keyword\":{\"match\":\"\\\\b(?:break|continue|do|while|exit|for|if|else|return)\\\\b\",\"name\":\"keyword.control.awk\"},\"numeric-constant\":{\"match\":\"\\\\b[0-9]+(?:\\\\.[0-9]+)?(?:e[-+][0-9]+)?\\\\b\",\"name\":\"constant.numeric.awk\"},\"operator\":{\"patterns\":[{\"match\":\"(!?~|[!<=>]=|[<>])\",\"name\":\"keyword.operator.comparison.awk\"},{\"match\":\"\\\\b(in)\\\\b\",\"name\":\"keyword.operator.comparison.awk\"},{\"match\":\"([-%*+/^]=|\\\\+\\\\+|--|>>|=)\",\"name\":\"keyword.operator.assignment.awk\"},{\"match\":\"(\\\\|\\\\||&&|!)\",\"name\":\"keyword.operator.boolean.awk\"},{\"match\":\"([-%*+/^])\",\"name\":\"keyword.operator.arithmetic.awk\"},{\"match\":\"([:?])\",\"name\":\"keyword.operator.trinary.awk\"},{\"match\":\"([]\\\\[])\",\"name\":\"keyword.operator.index.awk\"}]},\"pattern\":{\"patterns\":[{\"include\":\"#regexp-as-pattern\"},{\"include\":\"#function-definition\"},{\"include\":\"#builtin-pattern\"},{\"include\":\"#expression\"}]},\"procedure\":{\"begin\":\"\\\\{\",\"end\":\"}\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#procedure\"},{\"include\":\"#keyword\"},{\"include\":\"#expression\"}]},\"regex-as-assignment\":{\"begin\":\"([^-!%*+/<=>^]=)\\\\s*(/)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.operator.assignment.awk\"},\"2\":{\"name\":\"punctuation.definition.regex.begin.awk\"}},\"contentName\":\"string.regexp\",\"end\":\"/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.regex.end.awk\"}},\"patterns\":[{\"include\":\"source.regexp\"}]},\"regex-as-comparison\":{\"begin\":\"(!?~)\\\\s*(/)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.operator.comparison.awk\"},\"2\":{\"name\":\"punctuation.definition.regex.begin.awk\"}},\"contentName\":\"string.regexp\",\"end\":\"/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.regex.end.awk\"}},\"patterns\":[{\"include\":\"source.regexp\"}]},\"regex-as-first-argument\":{\"begin\":\"(\\\\()\\\\s*(/)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.brace.round.awk\"},\"2\":{\"name\":\"punctuation.definition.regex.begin.awk\"}},\"contentName\":\"string.regexp\",\"end\":\"/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.regex.end.awk\"}},\"patterns\":[{\"include\":\"source.regexp\"}]},\"regex-as-nth-argument\":{\"begin\":\"(,)\\\\s*(/)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.separator.parameters.awk\"},\"2\":{\"name\":\"punctuation.definition.regex.begin.awk\"}},\"contentName\":\"string.regexp\",\"end\":\"/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.regex.end.awk\"}},\"patterns\":[{\"include\":\"source.regexp\"}]},\"regexp-as-pattern\":{\"begin\":\"/\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.regex.begin.awk\"}},\"contentName\Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Ballerina\",\"fileTypes\":[\"bal\"],\"name\":\"ballerina\",\"patterns\":[{\"include\":\"#statements\"}],\"repository\":{\"access-modifier\":{\"patterns\":[{\"match\":\"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(p(?:ublic|rivate))(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))\",\"name\":\"storage.modifier.ballerina keyword.other.ballerina\"}]},\"annotationAttachment\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"punctuation.decorator.ballerina\"},\"2\":{\"name\":\"support.type.ballerina\"},\"3\":{\"name\":\"punctuation.decorator.ballerina\"},\"4\":{\"name\":\"support.type.ballerina\"}},\"match\":\"(@)([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(:?)\\\\s*((?:[$_[:alpha:]][$_[:alnum:]]*)?)\"}]},\"annotationDefinition\":{\"patterns\":[{\"begin\":\"\\\\bannotation\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.ballerina\"}},\"end\":\";\",\"patterns\":[{\"include\":\"#code\"}]}]},\"array-literal\":{\"begin\":\"\\\\s*(\\\\[)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.brace.square.ballerina\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"meta.brace.square.ballerina\"}},\"name\":\"meta.array.literal.ballerina\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#punctuation-comma\"}]},\"booleans\":{\"patterns\":[{\"match\":\"\\\\b(true|false)\\\\b\",\"name\":\"constant.language.boolean.ballerina\"}]},\"butClause\":{\"patterns\":[{\"begin\":\"=>\",\"beginCaptures\":{\"0\":{\"name\":\"meta.arrow.ballerina storage.type.function.arrow.ballerina\"}},\"end\":\",|(?=})\",\"patterns\":[{\"include\":\"#code\"}]}]},\"butExp\":{\"patterns\":[{\"begin\":\"\\\\bbut\\\\b\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.ballerina\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina.documentation\"}},\"patterns\":[{\"include\":\"#butExpBody\"},{\"include\":\"#comment\"}]}]},\"butExpBody\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina.documentation\"}},\"end\":\"(?=})\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina.documentation\"}},\"patterns\":[{\"include\":\"#parameter\"},{\"include\":\"#butClause\"},{\"include\":\"#comment\"}]}]},\"call\":{\"patterns\":[{\"match\":\"'?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(?=\\\\()\",\"name\":\"entity.name.function.ballerina\"}]},\"callableUnitBody\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina\"}},\"end\":\"(?=})\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina\"}},\"patterns\":[{\"include\":\"#workerDef\"},{\"include\":\"#service-decl\"},{\"include\":\"#objectDec\"},{\"include\":\"#function-defn\"},{\"include\":\"#forkStatement\"},{\"include\":\"#code\"}]}]},\"class-body\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.ballerina\"}},\"name\":\"meta.class.body.ballerina\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#mdDocumentation\"},{\"include\":\"#function-defn\"},{\"include\":\"#var-expr\"},{\"include\":\"#variable-initializer\"},{\"include\":\"#access-modifier\"},{\"include\":\"#keywords\"},{\"begin\":\"(?<=:)\\\\s*\",\"end\":\"(?=[-\\\\])+,:;}\\\\s]|^\\\\s*$|^\\\\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\\\\b)\"},{\"include\":\"#decl-block\"},{\"include\":\"#expression\"},{\"include\":\"#punctuation-comma\"},{\"include\":\"#punctuation-semicolon\"}]},\"class-defn\":{\"begin\":\"(\\\\s+)(class)\\\\b|^class\\\\b(?=\\\\s+|/[*/])\",\"beginCaptures\":{\"0\":{\"name\":\"storage.type.class.ballerina keyword.other.ballerina\"}},\"end\":\"(?<=})\",\"name\":\"meta.class.ballerina\",\"patterns\":[{\"include\":\"#keywords\"},{\"captures\":{\"0\":{\"name\":\"entity.name.type.class.ballerina\"}},\"match\":\"[$_[:alpha:]][$_[:alnum:]]*\"},{\"include\":\"#class-body\"}]},\"code\":{\"patterns\":[{\"include\":\"#booleans\"},{\"include\":\"#matchStatement\"},{\"include\":\"#butExp\"},{\"include\":\"#xml\"},{\"include\":\"#stringTemplate\"},{\"include\":\"#keywords\"},{\"include\":\"#strings\"},{\"include\":\"#comment\"},{\"include\":\"#mdDocumentation\"},{\"include\":\"#annotationAttachment\"},{\"include\":\"#numbers\"},{\"include\":\"#maps\"},{\"include\":\"#paranthesised\"},{\"include\":\"#paranthesisedBracket\"},{\"include\":\"#regex\"}]},\"comment\":{\"patterns\":[{\"match\":\"//.*\",\"name\":\"comment.ballerina\"}]},\"constrainType\":{\"patterns\":[{\"begin\":\"<\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.begin.ballerina\"}},\"end\":\">\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.parameters.end.ballerina\"}},\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#constrainType\"},{\"match\":\"\\\\b([$_[:alpha:]][$_[:alnum:]]*)\\\\bLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias bash for shellscript */
|
||||
export { default } from './shellscript.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Batch File\",\"injections\":{\"L:meta.block.repeat.batchfile\":{\"patterns\":[{\"include\":\"#repeatParameter\"}]}},\"name\":\"bat\",\"patterns\":[{\"include\":\"#commands\"},{\"include\":\"#comments\"},{\"include\":\"#constants\"},{\"include\":\"#controls\"},{\"include\":\"#escaped_characters\"},{\"include\":\"#labels\"},{\"include\":\"#numbers\"},{\"include\":\"#operators\"},{\"include\":\"#parens\"},{\"include\":\"#strings\"},{\"include\":\"#variables\"}],\"repository\":{\"command_set\":{\"patterns\":[{\"begin\":\"(?<=^|[@\\\\s])(?i:SET)(?=$|\\\\s)\",\"beginCaptures\":{\"0\":{\"name\":\"keyword.command.batchfile\"}},\"end\":\"(?=$\\\\n|[\\\\&)<>|])\",\"patterns\":[{\"include\":\"#command_set_inside\"}]}]},\"command_set_group\":{\"patterns\":[{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.group.begin.batchfile\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.group.end.batchfile\"}},\"patterns\":[{\"include\":\"#command_set_inside_arithmetic\"}]}]},\"command_set_inside\":{\"patterns\":[{\"include\":\"#escaped_characters\"},{\"include\":\"#variables\"},{\"include\":\"#numbers\"},{\"include\":\"#parens\"},{\"include\":\"#command_set_strings\"},{\"include\":\"#strings\"},{\"begin\":\"([^ ][^=]*)(=)\",\"beginCaptures\":{\"1\":{\"name\":\"variable.other.readwrite.batchfile\"},\"2\":{\"name\":\"keyword.operator.assignment.batchfile\"}},\"end\":\"(?=$\\\\n|[\\\\&)<>|])\",\"patterns\":[{\"include\":\"#escaped_characters\"},{\"include\":\"#variables\"},{\"include\":\"#numbers\"},{\"include\":\"#parens\"},{\"include\":\"#strings\"}]},{\"begin\":\"\\\\s+/[Aa]\\\\s+\",\"end\":\"(?=$\\\\n|[\\\\&)<>|])\",\"name\":\"meta.expression.set.batchfile\",\"patterns\":[{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.batchfile\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.batchfile\"}},\"name\":\"string.quoted.double.batchfile\",\"patterns\":[{\"include\":\"#command_set_inside_arithmetic\"},{\"include\":\"#command_set_group\"},{\"include\":\"#variables\"}]},{\"include\":\"#command_set_inside_arithmetic\"},{\"include\":\"#command_set_group\"}]},{\"begin\":\"\\\\s+/[Pp]\\\\s+\",\"end\":\"(?=$\\\\n|[\\\\&)<>|])\",\"patterns\":[{\"include\":\"#command_set_strings\"},{\"begin\":\"([^ ][^=]*)(=)\",\"beginCaptures\":{\"1\":{\"name\":\"variable.other.readwrite.batchfile\"},\"2\":{\"name\":\"keyword.operator.assignment.batchfile\"}},\"end\":\"(?=$\\\\n|[\\\\&)<>|])\",\"name\":\"meta.prompt.set.batchfile\",\"patterns\":[{\"include\":\"#strings\"}]}]}]},\"command_set_inside_arithmetic\":{\"patterns\":[{\"include\":\"#command_set_operators\"},{\"include\":\"#numbers\"},{\"match\":\",\",\"name\":\"punctuation.separator.batchfile\"}]},\"command_set_operators\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"variable.other.readwrite.batchfile\"},\"2\":{\"name\":\"keyword.operator.assignment.augmented.batchfile\"}},\"match\":\"([^ ]*)((?:[-*+/]|%%|[\\\\&^|]|<<|>>)=)\"},{\"match\":\"[-*+/]|%%|[\\\\&^|]|<<|>>|~\",\"name\":\"keyword.operator.arithmetic.batchfile\"},{\"match\":\"!\",\"name\":\"keyword.operator.logical.batchfile\"},{\"captures\":{\"1\":{\"name\":\"variable.other.readwrite.batchfile\"},\"2\":{\"name\":\"keyword.operator.assignment.batchfile\"}},\"match\":\"([^ =]*)(=)\"}]},\"command_set_strings\":{\"patterns\":[{\"begin\":\"(\\\")\\\\s*([^ ][^=]*)(=)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.string.begin.batchfile\"},\"2\":{\"name\":\"variable.other.readwrite.batchfile\"},\"3\":{\"name\":\"keyword.operator.assignment.batchfile\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.batchfile\"}},\"name\":\"string.quoted.double.batchfile\",\"patterns\":[{\"include\":\"#variables\"},{\"include\":\"#numbers\"},{\"include\":\"#escaped_characters\"}]}]},\"commands\":{\"patterns\":[{\"match\":\"(?<=^|[@\\\\s])(?i:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|managLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias batch for bat */
|
||||
export { default } from './bat.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias be for berry */
|
||||
export { default } from './berry.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Beancount\",\"fileTypes\":[\"beancount\"],\"name\":\"beancount\",\"patterns\":[{\"match\":\";.*\",\"name\":\"comment.line.beancount\"},{\"begin\":\"^\\\\s*(p(?:op|ush)tag)\\\\s+(#)([\\\\--9A-Z_a-z]+)\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.beancount\"},\"2\":{\"name\":\"keyword.operator.tag.beancount\"},\"3\":{\"name\":\"entity.name.tag.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.tag.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#illegal\"}]},{\"begin\":\"^\\\\s*(include)\\\\s+(\\\".*\\\")\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.beancount\"},\"2\":{\"name\":\"string.quoted.double.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.include.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#illegal\"}]},{\"begin\":\"^\\\\s*(option)\\\\s+(\\\".*\\\")\\\\s+(\\\".*\\\")\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.beancount\"},\"2\":{\"name\":\"support.variable.beancount\"},\"3\":{\"name\":\"string.quoted.double.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.option.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#illegal\"}]},{\"begin\":\"^\\\\s*(plugin)\\\\s*(\\\"(.*?)\\\")\\\\s*(\\\".*?\\\")?\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.beancount\"},\"2\":{\"name\":\"string.quoted.double.beancount\"},\"3\":{\"name\":\"entity.name.function.beancount\"},\"4\":{\"name\":\"string.quoted.double.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"keyword.operator.directive.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#illegal\"}]},{\"begin\":\"([0-9]{4})([-/|])([0-9]{2})([-/|])([0-9]{2})\\\\s+(open|close|pad)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"constant.numeric.date.year.beancount\"},\"2\":{\"name\":\"punctuation.separator.beancount\"},\"3\":{\"name\":\"constant.numeric.date.month.beancount\"},\"4\":{\"name\":\"punctuation.separator.beancount\"},\"5\":{\"name\":\"constant.numeric.date.day.beancount\"},\"6\":{\"name\":\"support.function.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.dated.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#meta\"},{\"include\":\"#account\"},{\"include\":\"#commodity\"},{\"match\":\",\",\"name\":\"punctuation.separator.beancount\"},{\"include\":\"#illegal\"}]},{\"begin\":\"([0-9]{4})([-/|])([0-9]{2})([-/|])([0-9]{2})\\\\s+(custom)\\\\b\",\"beginCaptures\":{\"1\":{\"name\":\"constant.numeric.date.year.beancount\"},\"2\":{\"name\":\"punctuation.separator.beancount\"},\"3\":{\"name\":\"constant.numeric.date.month.beancount\"},\"4\":{\"name\":\"punctuation.separator.beancount\"},\"5\":{\"name\":\"constant.numeric.date.day.beancount\"},\"6\":{\"name\":\"support.function.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.dated.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#meta\"},{\"include\":\"#string\"},{\"include\":\"#bool\"},{\"include\":\"#amount\"},{\"include\":\"#number\"},{\"include\":\"#date\"},{\"include\":\"#account\"},{\"include\":\"#illegal\"}]},{\"begin\":\"([0-9]{4})([-/|])([0-9]{2})([-/|])([0-9]{2})\\\\s(event)\",\"beginCaptures\":{\"1\":{\"name\":\"constant.numeric.date.year.beancount\"},\"2\":{\"name\":\"punctuation.separator.beancount\"},\"3\":{\"name\":\"constant.numeric.date.month.beancount\"},\"4\":{\"name\":\"punctuation.separator.beancount\"},\"5\":{\"name\":\"constant.numeric.date.day.beancount\"},\"6\":{\"name\":\"support.function.directive.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.dated.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#meta\"},{\"include\":\"#string\"},{\"include\":\"#illegal\"}]},{\"begin\":\"([0-9]{4})([-/|])([0-9]{2})([-/|])([0-9]{2})\\\\s(commodity)\",\"beginCaptures\":{\"1\":{\"name\":\"constant.numeric.date.year.beancount\"},\"2\":{\"name\":\"punctuation.separator.beancount\"},\"3\":{\"name\":\"constant.numeric.date.month.beancount\"},\"4\":{\"name\":\"punctuation.separator.beancount\"},\"5\":{\"name\":\"constant.numeric.date.day.beancount\"},\"6\":{\"name\":\"support.function.directive.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.dated.beancount\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#meta\"},{\"include\":\"#commodity\"},{\"include\":\"#illegal\"}]},{\"begin\":\"([0-9]{4})([-/|])([0-9]{2})([-/|])([0-9]{2})\\\\s(note|document)\",\"beginCaptures\":{\"1\":{\"name\":\"constant.numeric.date.year.beancount\"},\"2\":{\"name\":\"punctuation.separator.beancount\"},\"3\":{\"name\":\"constant.numeric.date.month.beancount\"},\"4\":{\"name\":\"punctuation.separator.beancount\"},\"5\":{\"name\":\"constant.numeric.date.day.beancount\"},\"6\":{\"name\":\"support.function.directive.beancount\"}},\"end\":\"(?=^(\\\\s*$|\\\\S))\",\"name\":\"meta.directive.dated.beancount\",\"patterns\":[{\Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Berry\",\"name\":\"berry\",\"patterns\":[{\"include\":\"#controls\"},{\"include\":\"#strings\"},{\"include\":\"#comment-block\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#function\"},{\"include\":\"#member\"},{\"include\":\"#identifier\"},{\"include\":\"#number\"},{\"include\":\"#operator\"}],\"repository\":{\"comment-block\":{\"begin\":\"#-\",\"end\":\"-#\",\"name\":\"comment.berry\",\"patterns\":[{}]},\"comments\":{\"begin\":\"#\",\"end\":\"\\\\n\",\"name\":\"comment.line.berry\",\"patterns\":[{}]},\"controls\":{\"patterns\":[{\"match\":\"\\\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\\\b\",\"name\":\"keyword.control.berry\"}]},\"function\":{\"patterns\":[{\"match\":\"\\\\b([A-Z_a-z][0-9A-Z_a-z]*(?=\\\\s*\\\\())\",\"name\":\"entity.name.function.berry\"}]},\"identifier\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z]\\\\w+\\\\b\",\"name\":\"identifier.berry\"}]},\"keywords\":{\"patterns\":[{\"match\":\"\\\\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\\\\b\",\"name\":\"keyword.berry\"}]},\"member\":{\"patterns\":[{\"captures\":{\"0\":{\"name\":\"entity.other.attribute-name.berry\"}},\"match\":\"\\\\.([A-Z_a-z][0-9A-Z_a-z]*)\"}]},\"number\":{\"patterns\":[{\"match\":\"0x\\\\h+|\\\\d+|(\\\\d+\\\\.?|\\\\.\\\\d)\\\\d*([Ee][-+]?\\\\d+)?\",\"name\":\"constant.numeric.berry\"}]},\"operator\":{\"patterns\":[{\"match\":\"[-\\\\]!%\\\\&(-+./:<=>\\\\[^|~]\",\"name\":\"keyword.operator.berry\"}]},\"strings\":{\"patterns\":[{\"begin\":\"f(?=[\\\"'])\",\"patterns\":[{\"begin\":\"\\\"\",\"end\":\"\\\"\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]},{\"begin\":\"'\",\"end\":\"'\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]}],\"while\":\"\\\\G|^[\\\\t ]*(?=[\\\"'])\"},{\"begin\":\"([\\\"'])\",\"end\":\"\\\\1\",\"name\":\"string.quoted.double.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"}]}]}},\"scopeName\":\"source.berry\",\"aliases\":[\"be\"]}"))
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"BibTeX\",\"name\":\"bibtex\",\"patterns\":[{\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.bibtex\"}},\"match\":\"@(?i:comment)(?=[({\\\\s])\",\"name\":\"comment.block.at-sign.bibtex\"},{\"include\":\"#preamble\"},{\"include\":\"#string\"},{\"include\":\"#entry\"},{\"begin\":\"[^\\\\n@]\",\"end\":\"(?=@)\",\"name\":\"comment.block.bibtex\"}],\"repository\":{\"entry\":{\"patterns\":[{\"begin\":\"((@)[-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\\\\s*(\\\\{)\\\\s*([^,}\\\\s]*)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.entry-type.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.entry.begin.bibtex\"},\"4\":{\"name\":\"entity.name.type.entry-key.bibtex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.entry.end.bibtex\"}},\"name\":\"meta.entry.braces.bibtex\",\"patterns\":[{\"begin\":\"([-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\\\\s*(=)\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.key.bibtex\"},\"2\":{\"name\":\"punctuation.separator.key-value.bibtex\"}},\"end\":\"(?=[,}])\",\"name\":\"meta.key-assignment.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]}]},{\"begin\":\"((@)[-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\\\\s*(\\\\()\\\\s*([^,\\\\s]*)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.entry-type.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.entry.begin.bibtex\"},\"4\":{\"name\":\"entity.name.type.entry-key.bibtex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.entry.end.bibtex\"}},\"name\":\"meta.entry.parenthesis.bibtex\",\"patterns\":[{\"begin\":\"([-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\\\\s*(=)\",\"beginCaptures\":{\"1\":{\"name\":\"support.function.key.bibtex\"},\"2\":{\"name\":\"punctuation.separator.key-value.bibtex\"}},\"end\":\"(?=[),])\",\"name\":\"meta.key-assignment.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]}]}]},\"field_value\":{\"patterns\":[{\"include\":\"#string_content\"},{\"include\":\"#integer\"},{\"include\":\"#string_var\"},{\"match\":\"#\",\"name\":\"keyword.operator.bibtex\"}]},\"integer\":{\"captures\":{\"1\":{\"name\":\"constant.numeric.bibtex\"}},\"match\":\"\\\\s*(\\\\d+)\\\\s*\"},\"nested_braces\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.group.begin.bibtex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.group.end.bibtex\"}},\"patterns\":[{\"include\":\"#nested_braces\"}]},\"preamble\":{\"patterns\":[{\"begin\":\"((@)(?i:preamble))\\\\s*(\\\\{)\\\\s*\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.preamble.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.preamble.begin.bibtex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.preamble.end.bibtex\"}},\"name\":\"meta.preamble.braces.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]},{\"begin\":\"((@)(?i:preamble))\\\\s*(\\\\()\\\\s*\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.preamble.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.preamble.begin.bibtex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.preamble.end.bibtex\"}},\"name\":\"meta.preamble.parenthesis.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]}]},\"string\":{\"patterns\":[{\"begin\":\"((@)(?i:string))\\\\s*(\\\\{)\\\\s*([-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.string-constant.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.string-constant.begin.bibtex\"},\"4\":{\"name\":\"variable.other.bibtex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.string-constant.end.bibtex\"}},\"name\":\"meta.string-constant.braces.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]},{\"begin\":\"((@)(?i:string))\\\\s*(\\\\()\\\\s*([-!$\\\\&*+./:;<>-z|~][!$\\\\&*+\\\\--<>-z|~]*)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.other.string-constant.bibtex\"},\"2\":{\"name\":\"punctuation.definition.keyword.bibtex\"},\"3\":{\"name\":\"punctuation.section.string-constant.begin.bibtex\"},\"4\":{\"name\":\"variable.other.bibtex\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.string-constant.end.bibtex\"}},\"name\":\"meta.string-constant.parenthesis.bibtex\",\"patterns\":[{\"include\":\"#field_value\"}]}]},\"string_content\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.bibtex\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.bibtex\"}},\"patterns\":[{\"include\":\"#nested_braces\"}]},{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definitioLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Bicep\",\"fileTypes\":[\".bicep\",\".bicepparam\"],\"name\":\"bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}],\"repository\":{\"array-literal\":{\"begin\":\"\\\\[(?!(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\bfor\\\\b)\",\"end\":\"]\",\"name\":\"meta.array-literal.bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}]},\"block-comment\":{\"begin\":\"/\\\\*\",\"end\":\"\\\\*/\",\"name\":\"comment.block.bicep\"},\"comments\":{\"patterns\":[{\"include\":\"#line-comment\"},{\"include\":\"#block-comment\"}]},\"decorator\":{\"begin\":\"@(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*(?=\\\\b[$_[:alpha:]][$_[:alnum:]]*\\\\b)\",\"end\":\"\",\"name\":\"meta.decorator.bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}]},\"directive\":{\"begin\":\"#\\\\b[-0-9A-Z_a-z]+\\\\b\",\"end\":\"$\",\"name\":\"meta.directive.bicep\",\"patterns\":[{\"include\":\"#directive-variable\"},{\"include\":\"#comments\"}]},\"directive-variable\":{\"match\":\"\\\\b[-0-9A-Z_a-z]+\\\\b\",\"name\":\"keyword.control.declaration.bicep\"},\"escape-character\":{\"match\":\"\\\\\\\\(u\\\\{\\\\h+}|['\\\\\\\\nrt]|\\\\$\\\\{)\",\"name\":\"constant.character.escape.bicep\"},\"expression\":{\"patterns\":[{\"include\":\"#string-literal\"},{\"include\":\"#multiline-string\"},{\"include\":\"#multiline-string-1-interp\"},{\"include\":\"#multiline-string-2-interp\"},{\"include\":\"#numeric-literal\"},{\"include\":\"#named-literal\"},{\"include\":\"#object-literal\"},{\"include\":\"#array-literal\"},{\"include\":\"#keyword\"},{\"include\":\"#identifier\"},{\"include\":\"#function-call\"},{\"include\":\"#decorator\"},{\"include\":\"#lambda-start\"},{\"include\":\"#directive\"}]},\"function-call\":{\"begin\":\"\\\\b([$_[:alpha:]][$_[:alnum:]]*)\\\\b(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.bicep\"}},\"end\":\"\\\\)\",\"name\":\"meta.function-call.bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}]},\"identifier\":{\"match\":\"\\\\b[$_[:alpha:]][$_[:alnum:]]*\\\\b(?!(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\()\",\"name\":\"variable.other.readwrite.bicep\"},\"keyword\":{\"match\":\"\\\\b(metadata|targetScope|resource|module|param|var|output|for|in|if|existing|import|as|type|with|using|extends|func|assert|extension)\\\\b\",\"name\":\"keyword.control.declaration.bicep\"},\"lambda-start\":{\"begin\":\"(\\\\((?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\b[$_[:alpha:]][$_[:alnum:]]*\\\\b(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*(,(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\b[$_[:alpha:]][$_[:alnum:]]*\\\\b(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*)*\\\\)|\\\\((?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\)|(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*\\\\b[$_[:alpha:]][$_[:alnum:]]*\\\\b(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*)(?=(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*=>)\",\"beginCaptures\":{\"1\":{\"name\":\"meta.undefined.bicep\",\"patterns\":[{\"include\":\"#identifier\"},{\"include\":\"#comments\"}]}},\"end\":\"(?:[\\\\t\\\\n\\\\r ]|/\\\\*(?:\\\\*(?!/)|[^*])*\\\\*/)*=>\",\"name\":\"meta.lambda-start.bicep\"},\"line-comment\":{\"match\":\"//.*(?=$)\",\"name\":\"comment.line.double-slash.bicep\"},\"multiline-1-string-subst\":{\"begin\":\"(\\\\$\\\\{)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.template-expression.begin.bicep\"}},\"end\":\"(})\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.template-expression.end.bicep\"}},\"name\":\"meta.multiline-1-string-subst.bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}]},\"multiline-2-string-subst\":{\"begin\":\"(\\\\$\\\\$\\\\{)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.template-expression.begin.bicep\"}},\"end\":\"(})\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.template-expression.end.bicep\"}},\"name\":\"meta.multiline-2-string-subst.bicep\",\"patterns\":[{\"include\":\"#expression\"},{\"include\":\"#comments\"}]},\"multiline-string\":{\"begin\":\"'''\",\"end\":\"'''(?!')\",\"name\":\"string.quoted.multi.bicep\",\"patterns\":[]},\"multiline-string-1-interp\":{\"begin\":\"(?<!\\\\$)\\\\$'''\",\"end\":\"'''(?!')\",\"name\":\"string.quoted.multi.bicep\",\"patterns\":[{\"include\":\"#multiline-1-string-subst\"}]},\"multiline-string-2-interp\":{\"begin\":\"\\\\$\\\\$'''\",\"end\":\"'''(?!')\",\"name\":\"string.quoted.multi.bicep\",\"patterns\":[{\"include\":\"#multiline-2-string-subst\"}]},\"named-literal\":{\"match\":\"\\\\b(true|false|null)\\\\b\",\"name\":\"constant.language.bicep\"},\"numeric-literal\":{\"match\":\"[0-9]+\",\"name\":\"constant.numeric.bicep\"},\"object-literal\":{\"begin\":\"\\\\{\",\"end\":\"}\",\"nLine truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Alias bird for bird2 */
|
||||
export { default } from './bird2.mjs'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"BIRD2 Configuration\",\"fileTypes\":[\"conf\",\"bird\",\"bird2\",\"bird3\",\"bird.conf\",\"bird2.conf\",\"bird3.conf\"],\"foldingStartMarker\":\"\\\\{\\\\s*$\",\"foldingStopMarker\":\"^\\\\s*}\",\"name\":\"bird2\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#strings\"},{\"include\":\"#numbers\"},{\"include\":\"#ip-addresses\"},{\"include\":\"#vpn-rd\"},{\"include\":\"#bytestrings\"},{\"include\":\"#bgp-paths\"},{\"include\":\"#prefixes\"},{\"include\":\"#template-definitions\"},{\"include\":\"#filter-definitions\"},{\"include\":\"#function-definitions\"},{\"include\":\"#protocol-definitions\"},{\"include\":\"#next-hop-statements\"},{\"include\":\"#neighbor-statements\"},{\"include\":\"#import-export-statements\"},{\"include\":\"#structural-keywords\"},{\"include\":\"#functional-keywords\"},{\"include\":\"#semantic-modifiers\"},{\"include\":\"#builtin-functions\"},{\"include\":\"#method-properties\"},{\"include\":\"#route-attributes\"},{\"include\":\"#data-types\"},{\"include\":\"#operators\"},{\"include\":\"#constants\"},{\"include\":\"#filter-names\"},{\"include\":\"#user-variables\"},{\"include\":\"#function-calls\"},{\"include\":\"#method-calls\"},{\"include\":\"#variable-declarations\"},{\"include\":\"#symbols\"},{\"include\":\"#blocks\"},{\"include\":\"#print-statements\"}],\"repository\":{\"bgp-paths\":{\"patterns\":[{\"begin\":\"\\\\[=\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.begin.bird\"}},\"end\":\"=]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.bgp-path.end.bird\"}},\"name\":\"meta.bgp-path.bird\",\"patterns\":[{\"match\":\"[*+?]\",\"name\":\"keyword.operator.wildcard.bird\"},{\"match\":\"\\\\b[0-9]+\\\\b\",\"name\":\"constant.numeric.asn.bird\"},{\"include\":\"#numbers\"}]}]},\"blocks\":{\"patterns\":[{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.begin.bird\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.block.end.bird\"}},\"name\":\"meta.block.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.begin.bird\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.set.end.bird\"}},\"name\":\"meta.set.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"begin\":\"\\\\(\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.begin.bird\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.tuple.end.bird\"}},\"name\":\"meta.tuple.bird\",\"patterns\":[{\"include\":\"$self\"}]},{\"match\":\";\",\"name\":\"punctuation.terminator.statement.bird\"},{\"match\":\",\",\"name\":\"punctuation.separator.bird\"}]},\"builtin-functions\":{\"patterns\":[{\"match\":\"\\\\b(?:defined|unset|printn??|roa_check|aspa_check|aspa_check_downstream|aspa_check_upstream|from_hex|format|prepend|add|delete|filter|empty|reset|bt_assert|bt_test_suite|bt_test_same)\\\\b\",\"name\":\"support.function.builtin.bird\"}]},\"bytestrings\":{\"patterns\":[{\"match\":\"\\\\b(?:hex:)?(?:\\\\h{2}[-.:\\\\s]*){2,}\\\\h{2}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"},{\"match\":\"\\\\b\\\\h{32,}\\\\b\",\"name\":\"constant.numeric.bytestring.bird\"}]},\"comments\":{\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.bird\"}},\"end\":\"$\",\"name\":\"comment.line.number-sign.bird\"},{\"begin\":\"/\\\\*\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.begin.bird\"}},\"end\":\"\\\\*/\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.end.bird\"}},\"name\":\"comment.block.bird\"}]},\"constants\":{\"patterns\":[{\"match\":\"\\\\b(?:on|off|yes|no|true|false)\\\\b\",\"name\":\"constant.language.boolean.bird\"},{\"match\":\"\\\\b(?:empty|unknown|generic|rt|ro|one|ten)\\\\b\",\"name\":\"constant.language.special.bird\"},{\"match\":\"\\\\bSCOPE_(?:HOST|LINK|SITE|ORGANIZATION|UNIVERSE)\\\\b\",\"name\":\"constant.language.scope.bird\"},{\"match\":\"\\\\bRTS_(?:STATIC|INHERIT|DEVICE|RIP|OSPF|OSPF_IA|OSPF_EXT1|OSPF_EXT2|BGP|PIPE|BABEL)\\\\b\",\"name\":\"constant.language.source.bird\"},{\"match\":\"\\\\bRTD_(?:ROUTER|DEVICE|MULTIPATH|BLACKHOLE|UNREACHABLE|PROHIBIT)\\\\b\",\"name\":\"constant.language.dest.bird\"},{\"match\":\"\\\\bROA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.roa.bird\"},{\"match\":\"\\\\bASPA_(?:UNKNOWN|INVALID|VALID)\\\\b\",\"name\":\"constant.language.aspa.bird\"},{\"match\":\"\\\\bNET_(?:IP4|IP6|IP6_SADR|VPN4|VPN6|ROA4|ROA6|FLOW4|FLOW6|MPLS)\\\\b\",\"name\":\"constant.language.net-type.bird\"},{\"match\":\"\\\\bMPLS_POLICY_(?:NONE|STATIC|PREFIX|AGGREGATE|VRF)\\\\b\",\"name\":\"constant.language.mpls.bird\"}]},\"data-types\":{\"patterns\":[{\"match\":\"\\\\b(?:int|bool|ip|prefix|rd|pair|quad|ec|lc|string|bytestring|bgpmask|bgppath|clist|eclist|lclist|set|enum|route)\\\\b\",\"name\":\"storage.type.bird\"}]},\"filter-Line truncated
|
||||
|
||||
export default [
|
||||
lang
|
||||
]
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import type { LanguageRegistration } from '@shikijs/types'
|
||||
declare const langs: LanguageRegistration[]
|
||||
export default langs
|
||||
Loaded 100 of 10119 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user