Fix TSS parsing multiple tags
This commit is contained in:
parent
7da00e990e
commit
7c5de5a370
@ -133,8 +133,8 @@ func (this *parser) parseSelector () (Selector, error) {
|
|||||||
// tags
|
// tags
|
||||||
err = this.ExpectNext(LBracket)
|
err = this.ExpectNext(LBracket)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
this.Next()
|
|
||||||
for {
|
for {
|
||||||
|
this.Next()
|
||||||
err := this.Expect(Ident, String, RBracket)
|
err := this.Expect(Ident, String, RBracket)
|
||||||
if err != nil { return Selector { }, err }
|
if err != nil { return Selector { }, err }
|
||||||
if this.Is(RBracket) { break }
|
if this.Is(RBracket) { break }
|
||||||
@ -142,6 +142,7 @@ func (this *parser) parseSelector () (Selector, error) {
|
|||||||
selector.Tags = append(selector.Tags, this.Value())
|
selector.Tags = append(selector.Tags, this.Value())
|
||||||
err = this.ExpectNext(Comma, RBracket)
|
err = this.ExpectNext(Comma, RBracket)
|
||||||
if err != nil { return Selector { }, err }
|
if err != nil { return Selector { }, err }
|
||||||
|
if this.Is(RBracket) { break }
|
||||||
}
|
}
|
||||||
this.Next()
|
this.Next()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user