Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

Commit

Permalink
Fixed #15: tag spacing issue in Parser.String()
Browse files Browse the repository at this point in the history
  • Loading branch information
Armen Boursalian committed Oct 15, 2017
1 parent 91a9b4f commit dbbc41b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grammar/grammar.funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func (p *Parser) String() string {

r += fmt.Sprintf("rule %s", rule.Name)
if len(rule.Tags) > 0 {
r += fmt.Sprintf(" :")
for i := 0; i < len(rule.Tags)-1; i++ {
r += fmt.Sprintf(" %s", rule.Tags[i])
r += " :"
for _, tag := range rule.Tags {
r += fmt.Sprintf(" %s", tag)
}
r += fmt.Sprintf("%s {\n", rule.Tags[len(rule.Tags)-1])
r += " {\n"
} else {
r += fmt.Sprintf(" {\n")
}
Expand Down

0 comments on commit dbbc41b

Please sign in to comment.