A leaf node is a node with no children, thus it represents a source token. All non-leaf nodes represent a grouping of source tokens in the parse tree.
The source tokens can be considered as an ordered list as well as the leaves of a tree - prior and next give the tokens just before and just after the current one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Could you explain what you mean by PriorLeafNode, NextLeafNode in ParseTreeNode.pas.
What do they do?
What do you consider a leaf --a node with no child?
A leaf node is a node with no children, thus it represents a source token. All non-leaf nodes represent a grouping of source tokens in the parse tree.
The source tokens can be considered as an ordered list as well as the leaves of a tree - prior and next give the tokens just before and just after the current one.