summaryrefslogtreecommitdiff
path: root/decoder/tree_fragment.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/tree_fragment.h')
-rw-r--r--decoder/tree_fragment.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/tree_fragment.h b/decoder/tree_fragment.h
index ceb7fa60..f1c4c106 100644
--- a/decoder/tree_fragment.h
+++ b/decoder/tree_fragment.h
@@ -139,6 +139,10 @@ class BreadthFirstIterator : public std::iterator<std::forward_iterator_tag, uns
q_.pop_back();
return *this;
}
+ unsigned child_node() const {
+ assert(IsRHS(sym));
+ return q_.back().node;
+ }
BreadthFirstIterator remainder() const {
assert(IsRHS(sym));
return BreadthFirstIterator(tf_, q_.back());