Node class

From Sunhill Framework Documentation
Revision as of 11:00, 17 March 2025 by Klaus (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Node class represents a single entry in the abstract structure tree (AST) that is built while parsing. The class Node is a prototype for the child classes but it could be used directly.

Public functions

It defines the following public functions

__construct(string $type, array $children)

Creates a new node with the given type and the given children

getType(): string

Returns the type of the node

getChildren(): array

Returns the current set children.

Derrived classes