UNPKG

ecmarkup

Version:

Custom element definitions and core utilities for markup that specifies ECMAScript and related technologies.

26 lines (25 loc) 913 B
import type { Production, RightHandSide, OneOfList, SourceFile, Grammar as GrammarFile } from 'grammarkdown'; import type { Node as EcmarkdownNode } from 'ecmarkdown'; export declare function getProductions(sourceFiles: readonly SourceFile[]): Map<string, { production: Production; rhses: (RightHandSide | OneOfList)[]; }>; export declare function rhsMatches(a: RightHandSide | OneOfList, b: RightHandSide | OneOfList): boolean; export declare function getLocationInGrammarFile(file: SourceFile, pos: number): { line: number; column: number; }; export declare function collectNonterminalsFromGrammar(grammar: GrammarFile): { name: string; loc: { line: number; column: number; }; }[]; export declare function collectNonterminalsFromEmd(emdNode: EcmarkdownNode | EcmarkdownNode[]): { name: string; loc: { line: number; column: number; }; }[];