[#280] policy: Remove error listeners from query lexer

In previous implementation `PlacementPolicy.DecodeString` produced
undesired console logs.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/fyrchik/update-contracts
Leonard Lyubich 2022-06-28 09:27:46 +03:00 committed by fyrchik
parent d2cd9ebfbd
commit dea3d9c419
1 changed files with 1 additions and 0 deletions

View File

@ -553,6 +553,7 @@ func writeFilterStringTo(w io.StringWriter, f netmap.Filter) error {
func (p *PlacementPolicy) DecodeString(s string) error {
input := antlr.NewInputStream(s)
lexer := parser.NewQueryLexer(input)
lexer.RemoveErrorListeners()
stream := antlr.NewCommonTokenStream(lexer, 0)
pp := parser.NewQuery(stream)