update query parser's prefix list
This commit is contained in:
parent
e0d2530ff5
commit
a5b3f072b4
@ -132,13 +132,7 @@ tests_parseQuery = [
|
||||
parseQuery d "\"" `is` (Acct "\"", [])
|
||||
]
|
||||
|
||||
-- keep synced with patterns below, excluding "not"
|
||||
prefixes = map (++":") [
|
||||
"inacct","inacctonly",
|
||||
"desc","acct","date","edate","status","real","empty","depth"
|
||||
]
|
||||
defaultprefix = "acct"
|
||||
|
||||
-- XXX
|
||||
-- | Quote-and-prefix-aware version of words - don't split on spaces which
|
||||
-- are inside quotes, including quotes which may have one of the specified
|
||||
-- prefixes in front, and maybe an additional not: prefix in front of that.
|
||||
@ -172,6 +166,24 @@ tests_words'' = [
|
||||
"\"" `gives` ["\""]
|
||||
]
|
||||
|
||||
-- XXX
|
||||
-- keep synced with patterns below, excluding "not"
|
||||
prefixes = map (++":") [
|
||||
"inacctonly"
|
||||
,"inacct"
|
||||
,"desc"
|
||||
,"acct"
|
||||
,"date"
|
||||
,"edate"
|
||||
,"status"
|
||||
,"real"
|
||||
,"empty"
|
||||
,"depth"
|
||||
,"tag"
|
||||
]
|
||||
|
||||
defaultprefix = "acct"
|
||||
|
||||
-- -- | Parse the query string as a boolean tree of match patterns.
|
||||
-- parseQueryTerm :: String -> Query
|
||||
-- parseQueryTerm s = either (const (Any)) id $ runParser query () "" $ lexmatcher s
|
||||
|
||||
Loading…
Reference in New Issue
Block a user