Skip to content

Commit

Permalink
get out earlier if negation error
Browse files Browse the repository at this point in the history
  • Loading branch information
clipperhouse committed Aug 3, 2014
1 parent 5a20b1f commit 8526456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typewriter/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ func parseTags(d string) (Pointer, Tags, error) {
}
return false, nil, err
case itemMinus:
t.Negated = true
if len(t.Items) > 0 {
err := &SyntaxError{
msg: fmt.Sprintf("negation must precede tag values"),
Pos: item.pos,
}
return false, nil, err
}
t.Negated = true
case itemIdentifier:
t.Items = append(t.Items, item.val)
case itemComma:
Expand Down

0 comments on commit 8526456

Please sign in to comment.