Phrase Node
A node of a tree that represents an occurrence of an A_Phrase in this A_Module. If the phrase is a send or macro invocation, the information about which atom's bundle was sent is available, as are the tokens that are part of the phrase (but not its subphrases).
Constructors
Create a PhraseNode from its parts. The list of children is mutable, and can be provided here or added later.
Types
An entry in the tokenSpans of a PhraseNode. The start and pastEnd identify where the token occurs in the UCS-2 source String, using zero-based indices. The tokenIndexInName is either zero or a one-based index into the atom's MessageSplitter's MessageSplitter.messageParts, indicating the part of the message that this token matched during parsing.
Properties
If this node is a SEND_PHRASE or MACRO_SUBSTITUTION_PHRASE, this is the name of the module in which the sent bundle's atom was defined. Otherwise null.
If this node is a SEND_PHRASE or MACRO_SUBSTITUTION_PHRASE, this is the name of the sent bundle's atom. Otherwise null.
The children of this phrase, which roughly correspond to subphrases. For a send phrase or macro send phrase, these may be the argument phrases or the list phrases that group them, depending on the structure of the sent bundle's name (see MessageSplitter).
This is the 1-based index of this node within its parent, or -1 if there is no parent.
As a nicety, a PhraseNode can answer the optional NameInModule that represents the name of what's being called, if anything.
The node representing the optional parent phrase of this node's phrase. This can be provided here, or left null to be set later. If present, the new node will be automatically added as a child of the parent.
If the atomName is not null, this is a lazily-computed MessageSplitter derived from that name. Otherwise, this is null.
The regions of the file that tokens of this phrase occupy. Each region is a PhraseNodeToken representing the one-based start and pastEnd positions in the source string, adjusted to UCS-2 ("Char") positions. It also contains an index into the splitter's tuple of parts, to say what the token was, or zero if it was not a literal part of the message name.
The UsageType that indicates the nature of the phrase that this node summarizes.
Functions
Output this phrase on the builder, while trying to avoid exceeding the characterBudget. The builder expects html text, but without the outer html tag.