@finnair/path-parser
Version:
Simple object path as array of strings and numbers
21 lines (20 loc) • 445 B
TypeScript
import moo from 'moo';
interface NearleyRule {
name: string;
symbols: NearleySymbol[];
postprocess?: (d: any[], loc?: number, reject?: {}) => any;
}
type NearleySymbol = string | {
literal: any;
} | {
type: any;
} | {
test: (token: any) => boolean;
};
interface Grammar {
Lexer: moo.Lexer | undefined;
ParserRules: NearleyRule[];
ParserStart: string;
}
declare const grammar: Grammar;
export default grammar;