Helper container for singly linked lists of parse nodes, which tracks the tail of the list so that nodes can be appended in constant time. It does not own the nodes.
More...
#include <bond/compiler/parsenodes.h>
|
| | ParseNodeList () |
| | Constructs an empty parse node list.
|
| bool | IsEmpty () const |
| | Returns true if the list has no nodes.
|
| NodeType * | GetHead () const |
| | Returns the first node in the list.
|
| void | Append (NodeType *node) |
| | Appends a node to the end of the list.
|
template<typename NodeType>
class Bond::ParseNodeList< NodeType >
Helper container for singly linked lists of parse nodes, which tracks the tail of the list so that nodes can be appended in constant time. It does not own the nodes.
- Template Parameters
-
| NodeType | The type of the nodes in the list, which must derive from ListParseNode. |
◆ ParseNodeList()
template<typename NodeType>
Constructs an empty parse node list.
◆ Append()
template<typename NodeType>
Appends a node to the end of the list.
- Parameters
-
| node | Node to append. Null nodes are ignored. |
◆ GetHead()
template<typename NodeType>
Returns the first node in the list.
- Returns
- The head node, or null when the list is empty.
◆ IsEmpty()
template<typename NodeType>
Returns true if the list has no nodes.
The documentation for this class was generated from the following file:
- include/bond/compiler/parsenodes.h