[#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>
This commit is contained in:
Leonard Lyubich 2022-06-28 09:27:46 +03:00 committed by fyrchik
parent d2cd9ebfbd
commit dea3d9c419

View file

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