diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-19 13:47:28 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-19 13:47:28 +0800 |
commit | 7da8b814d53c389849cfb5a8c9884afcd4215eac (patch) | |
tree | 5ccf8e58f5290f3c2e343abb62550b94efca62c2 /chain/src | |
parent | a9ce21b2ff3de3e063361e17961384ba0fe9d975 (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')
-rw-r--r-- | chain/src/item/genins.rs | 2 |
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(); |