Add node_id() to C++ and D tree node handles
This commit is contained in:
1 parent
e5bb6db4a4
commit
dc95fe041d
6 files changed
+34
-6
No files matched your search
@@ -149,6 +149,12 @@ public struct <%= @grammar.tree_prefix %>Token<%= @grammar.tree_suffix %>
|
||||
return __id != 0u;
|
||||
}
|
||||
|
||||
/** Return the node ID (for identity comparison). */
|
||||
@property <%= @grammar.prefix %>node_id_t node_id()
|
||||
{
|
||||
return __id;
|
||||
}
|
||||
|
||||
/** Access the underlying node record (token, pvalue, and user fields). */
|
||||
@property ref <%= @grammar.prefix %>node_data_t __node()
|
||||
{
|
||||
@@ -177,6 +183,12 @@ public struct <%= @grammar.tree_prefix %><%= rule_set.name %><%= @grammar.tree_s
|
||||
return __id != 0u;
|
||||
}
|
||||
|
||||
/** Return the node ID (for identity comparison). */
|
||||
@property <%= @grammar.prefix %>node_id_t node_id()
|
||||
{
|
||||
return __id;
|
||||
}
|
||||
|
||||
/** Text position of the first code point spanned by this node. */
|
||||
@property <%= @grammar.prefix %>position_t position()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user