forked from TrueCloudLab/frostfs-sdk-go
[#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:
parent
d2cd9ebfbd
commit
dea3d9c419
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue