PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


Parent package: Foswiki::Infix
Child packages:

    internal package Foswiki::Infix::Node

    Base class for node types generated by Infix::Parser (and its subclasses). This defines the interface used to construct nodes from the parser.

    ClassMethod newNode( $o, @p ) → \$if

    Construct a new parse node (contract with Infix::Parser)

    ClassMethod newLeaf( $val, $type ) → \$if

    Construct a new terminal node (contract with Infix::Parser)

    • $val - the (scalar) value of the leaf
    • $type - one of NAME, NUMBER, STRING

    ObjectMethod convertToLeaf( $type, $val )

    Convert the node into a terminal node.

    • $type - one of NAME, NUMBER, STRING
    • $val - the (scalar) value of the leaf

    Not used by the Foswiki::Infix::Parser.

    ObjectMethod isLeaf() → $boolean

    Return true if this node was created by newLeaf() (or converted by convertToLeaf)

    ObjectMethod stringify() → $string

    Generate a string representation of the subtree, for reporting. The representation generated by this function should be parseable, but is not guaranteed to be.

    Topic revision: r1 - 2024-12-23, UnknownUser

    This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
    Ideas, requests, problems regarding Foswiki? Send feedback