From 5e4dc87ffec7f87bbf3ebfcf256777ad773e8450 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 14 Mar 2020 16:47:38 +0100 Subject: cache: replace the all-in-one query parser by a complete one with AST/lexer/parser --- termui/termui.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'termui/termui.go') diff --git a/termui/termui.go b/termui/termui.go index 1ef960de..96b7583c 100644 --- a/termui/termui.go +++ b/termui/termui.go @@ -12,6 +12,7 @@ import ( "github.com/MichaelMure/git-bug/cache" "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/input" + "github.com/MichaelMure/git-bug/query" ) var errTerminateMainloop = errors.New("terminate gocui mainloop") @@ -336,12 +337,12 @@ func editQueryWithEditor(bt *bugTable) error { bt.queryStr = queryStr - query, err := cache.ParseQuery(queryStr) + q, err := query.Parse(queryStr) if err != nil { ui.msgPopup.Activate(msgPopupErrorTitle, err.Error()) } else { - bt.query = query + bt.query = q } initGui(nil) -- cgit