From dea3d9c419cef894f7d810d01f9b5970c64bf143 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 28 Jun 2022 09:27:46 +0300 Subject: [PATCH] [#280] policy: Remove error listeners from query lexer In previous implementation `PlacementPolicy.DecodeString` produced undesired console logs. Signed-off-by: Leonard Lyubich --- netmap/policy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/netmap/policy.go b/netmap/policy.go index 6139f9ff..28b53900 100644 --- a/netmap/policy.go +++ b/netmap/policy.go @@ -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)