diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-02-17 01:32:46 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-02-17 01:32:46 +0900 |
commit | c99ad4391d7e0c458eaf5e276ffa839efcaa13c0 (patch) | |
tree | e1af83a66dcc6ae594789be3eca77ff32e28fa1d /compiler/ast.go | |
parent | Add logging to lex command (diff) | |
download | tre-c99ad4391d7e0c458eaf5e276ffa839efcaa13c0.tar.gz tre-c99ad4391d7e0c458eaf5e276ffa839efcaa13c0.tar.xz |
Fix computation of last positions
Diffstat (limited to 'compiler/ast.go')
-rw-r--r-- | compiler/ast.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ast.go b/compiler/ast.go index d4b8956..17054d0 100644 --- a/compiler/ast.go +++ b/compiler/ast.go @@ -260,6 +260,9 @@ func (n *concatNode) first() symbolPositionSet { func (n *concatNode) last() symbolPositionSet { s := newSymbolPositionSet() s.merge(n.right.last()) + if n.right.nullable() { + s.merge(n.left.last()) + } return s } |