wikiparser-node
Version:
A Node.js parser for MediaWiki markup with AST
23 lines (22 loc) • 758 B
TypeScript
import { Token } from './index';
import type { Config, LintError } from '../base';
import type { SyntaxBase } from '../mixin/syntax';
export interface SyntaxToken extends SyntaxBase {
}
declare type SyntaxTypes = 'heading-trail' | 'magic-word-name' | 'table-syntax' | 'redirect-syntax' | 'translate-attr';
/**
* plain token that satisfies specific grammar syntax
*
* 满足特定语法格式的plain Token
*/
export declare class SyntaxToken extends Token {
#private;
get type(): SyntaxTypes;
/**
* @class
* @param pattern 语法正则
*/
constructor(wikitext: string | undefined, pattern: RegExp, type: SyntaxTypes, config?: Config, accum?: Token[], acceptable?: WikiParserAcceptable);
cloneNode(): this;
}
export {};