summaryrefslogtreecommitdiffhomepage
path: root/grammer.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-10-31 18:10:58 +0100
committerRoland Reichwein <mail@reichwein.it>2020-10-31 18:10:58 +0100
commit8256280b348b4b53fff35c9101ced0a8dfb2c58e (patch)
treee745b79e98c853cf1891372e8b2a926a5d81fff5 /grammer.h
parentce77838c4f32b9dc237f0c4b17d1f1e1741254d4 (diff)
CPP::translate() (WIP), documentation, bugfixing
Diffstat (limited to 'grammer.h')
-rw-r--r--grammer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/grammer.h b/grammer.h
index a8a3356..e179a9e 100644
--- a/grammer.h
+++ b/grammer.h
@@ -22,8 +22,8 @@ struct NodePosition {
// token_id: index into token list
// node_id: index into tree node list
struct TreeNode {
- NodePosition pos; // position of this node in tree
- index_t node_id{};
+ NodePosition pos; // position of this node in tree (i.e. parent node_id + child_pos in parent)
+ index_t node_id{}; // this node's id
std::string type;
index_t variant; // bnf[type][variant]