UNPKG

@gram-data/gram-ops

Version:
14 lines (13 loc) 626 B
import { GramEdge, GramNode, GramPath, GramSeq } from '@gram-data/gram-ast'; export declare const count: (p: GramPath) => number; export declare const head: (p: GramPath) => GramNode; export declare const tail: (p: GramPath) => GramNode; export declare const merge: (_: GramPath, next: GramPath) => GramPath; export declare const identity: (p: GramPath) => string | undefined; /** * Node set projected from within a path. * * @param p paths from which to project nodes */ export declare const nodes: (p: GramPath | GramPath[] | GramSeq) => GramNode[]; export declare const edges: (p: GramPath) => GramEdge[];