Fix TSS parsing multiple tags

This commit is contained in:
Sasha Koshka 2024-08-14 11:58:33 -04:00
parent 7da00e990e
commit 7c5de5a370

View File

@ -133,8 +133,8 @@ func (this *parser) parseSelector () (Selector, error) {
// tags
err = this.ExpectNext(LBracket)
if err == nil {
this.Next()
for {
this.Next()
err := this.Expect(Ident, String, RBracket)
if err != nil { return Selector { }, err }
if this.Is(RBracket) { break }
@ -142,6 +142,7 @@ func (this *parser) parseSelector () (Selector, error) {
selector.Tags = append(selector.Tags, this.Value())
err = this.ExpectNext(Comma, RBracket)
if err != nil { return Selector { }, err }
if this.Is(RBracket) { break }
}
this.Next()
}