Vanha frontend siirretty temp/. Uusi rakenne: - StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro - global.css erillinen - Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava) - Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md - Ei tokenisointia eikä koodilaboratoriota Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 lines
997 B
TypeScript
31 lines
997 B
TypeScript
import { PatternScanner, RegexEngineString } from "@shikijs/types";
|
|
import { IOnigMatch } from "@shikijs/vscode-textmate";
|
|
|
|
//#region src/scanner.d.ts
|
|
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;
|
|
}
|
|
//#endregion
|
|
export { JavaScriptScanner as n, JavaScriptRegexScannerOptions as t }; |