PiDraw API
    Preparing search index...

    Interface ParserItem

    A kind of figure of the syntax, as the parser of the figure describes it: how to build it from a line of code, and what PiDraw.documentation() and the editor say about it. The parser of a figure exports one table of these, by key.

    interface ParserItem {
        build: (
            item: PARSER,
            figures: Record<string, AbstractFigure>,
            config: IGraphConfig,
        ) => BuildResult<unknown> | BuildResult<unknown>[] | null;
        description: string;
        forms: string[];
        labelFields?: readonly LabelFieldName[];
        name: string;
        summary: string;
    }
    Index
    build: (
        item: PARSER,
        figures: Record<string, AbstractFigure>,
        config: IGraphConfig,
    ) => BuildResult<unknown> | BuildResult<unknown>[] | null

    Reads the definition of a line (before the ->): the figures to make, or null when there is nothing to make. The options are not read.

    ParseError if the values of the line do not suit the key.

    description: string

    What the key makes, in a sentence.

    forms: string[]

    The forms of the line, one by string, with the kinds of values between <> (A=mid <point>,<point>).

    labelFields?: readonly LabelFieldName[]

    The fields that the label of the figure can show with @name (see labelFields() of the figure): the editor suggests them. None by default.

    name: string

    The name of the kind of figure.

    summary: string

    One line for the suggestions of the editor: an example of the key, and what it makes (A=mid A,B — middle).