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

Commit

Permalink
Merge pull request #17 from Northern-Lights/master
Browse files Browse the repository at this point in the history
Fixed #16: tag spacing issue in Parser.String()
  • Loading branch information
Xumeiquer authored Oct 15, 2017
2 parents 1383e86 + e0da09b commit 8c121d8
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 8c121d8

Please sign in to comment.