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 $val
- the (scalar) value of the leaf
$type
- one of NAME, NUMBER, STRING
ObjectMethod
convertToLeaf( $type, $val ) $type
- one of NAME, NUMBER, STRING
$val
- the (scalar) value of the leaf
ObjectMethod
isLeaf() → $boolean 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.