UNPKG

@hashicorp/design-system-components

Version:
48 lines (47 loc) 1.2 kB
/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import type { StringStream } from '@codemirror/language'; interface ParserConfig { delimiters?: RegExp; operators?: RegExp; } interface SentinelState { tokenize: (stream: StringStream, state: SentinelState) => string | null; } export declare function mkSentinel(parserConf: ParserConfig): { name: string; startState: () => SentinelState; token: (stream: StringStream, state: SentinelState) => string | null; languageData: { commentTokens: { line: string; block: { open: string; close: string; }; }; closeBrackets: { brackets: string[]; }; }; }; export declare const sentinel: { name: string; startState: () => SentinelState; token: (stream: StringStream, state: SentinelState) => string | null; languageData: { commentTokens: { line: string; block: { open: string; close: string; }; }; closeBrackets: { brackets: string[]; }; }; }; export {};