aboutsummaryrefslogtreecommitdiffstats
path: root/termui/bug_table.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-03-28 17:17:13 +0100
committerGitHub <noreply@github.com>2020-03-28 17:17:13 +0100
commit390e66eb2b3a7088cdb8a44eeaf384fe691daf4a (patch)
tree05386ddf08d7e1c2947a6fc6cf2fbd44efa19eaf /termui/bug_table.go
parent58abc6b0a35b679ac0c34579ff1cb53c8fa71af4 (diff)
parent314fcbb2293d869c33d6a76aedd148aedff6561d (diff)
downloadgit-bug-390e66eb2b3a7088cdb8a44eeaf384fe691daf4a.tar.gz
Merge pull request #355 from MichaelMure/query-parser-ast
replace the all-in-one query parser by a complete one with AST/lexer/parser
Diffstat (limited to 'termui/bug_table.go')
-rw-r--r--termui/bug_table.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go
index 41aa4e83..80d5ebcb 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -12,6 +12,7 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/query"
"github.com/MichaelMure/git-bug/util/colors"
)
@@ -26,7 +27,7 @@ const defaultQuery = "status:open"
type bugTable struct {
repo *cache.RepoCache
queryStr string
- query *cache.Query
+ query *query.Query
allIds []entity.Id
excerpts []*cache.BugExcerpt
pageCursor int
@@ -34,14 +35,14 @@ type bugTable struct {
}
func newBugTable(c *cache.RepoCache) *bugTable {
- query, err := cache.ParseQuery(defaultQuery)
+ q, err := query.Parse(defaultQuery)
if err != nil {
panic(err)
}
return &bugTable{
repo: c,
- query: query,
+ query: q,
queryStr: defaultQuery,
pageCursor: 0,
selectCursor: 0,