import { Maybe } from "purify-ts/Maybe"; /** A parent function takes a given node and returns its parent, if it has one. */ export declare type ParentFunc = (x: T) => Maybe; /** This is the information available when evaluating an inherited attribute. */ export interface InheritedArgs { /** The node for which we are evaluating the attribute. */ node: T; /** Information about the parent (if this node has a parent) */ parent: Maybe>; } /** * This is the information the inherited attribute evaluator is given about the * parent node **if it exists**. **/ export interface ParentInformation { node: T; attr: R; } /** A parent attribute is a special case of an inherited attribute */ export declare type ParentAttribute = InheritedAttributeEvaluator>; /** * An inherited attribute evaluator takes `InheritedArgs` as an argument and * returns the attribute value. **/ export declare type InheritedAttributeEvaluator = (args: InheritedArgs) => R;