summaryrefslogtreecommitdiff
path: root/chain/src/item/genins.rs
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-07-19 13:47:28 +0800
committerJSDurand <mmemmew@gmail.com>2023-07-19 13:47:28 +0800
commit7da8b814d53c389849cfb5a8c9884afcd4215eac (patch)
tree5ccf8e58f5290f3c2e343abb62550b94efca62c2 /chain/src/item/genins.rs
parenta9ce21b2ff3de3e063361e17961384ba0fe9d975 (diff)
genins: Fix the bug of forgetting to set ending positions.
Previously a virtual fragment did not receive proper ending positions. This is now fixed. Additionally, after this fix, the function `set_pos` is only called with the last parameter set to `t`. Maybe I shall remove this parameter.
Diffstat (limited to 'chain/src/item/genins.rs')
-rw-r--r--chain/src/item/genins.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/chain/src/item/genins.rs b/chain/src/item/genins.rs
index 1996545..0de7198 100644
--- a/chain/src/item/genins.rs
+++ b/chain/src/item/genins.rs
@@ -335,7 +335,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> {
if let Some(frag) = virtual_frag {
let mut frag = (*frag.get(0).unwrap()).clone();
- frag.set_pos(atom, node_label.label().start(), false)?;
+ frag.set_pos(atom, node_label.label().start(), true)?;
let frag_nodes_len = frag.nodes_len();