summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2018-06-11 12:02:50 +1000
committerAdam Scarr <adam@vektah.net>2018-06-11 12:02:50 +1000
commit3e20a3b9244aa003fcaf26a625ef48246aef55f7 (patch)
tree621af252b529fd4a96421e38deebb9ff8bcadb27
parentf98f07b765c11616aa4182c45f52d69c8addb32d (diff)
appease the linting gods
-rw-r--r--combinator_test.go5
-rw-r--r--parser.go4
2 files changed, 5 insertions, 4 deletions
diff --git a/combinator_test.go b/combinator_test.go
index aa16e21..b315b37 100644
--- a/combinator_test.go
+++ b/combinator_test.go
@@ -3,9 +3,10 @@ package goparsify
import (
"testing"
- "github.com/stretchr/testify/require"
- "os"
"fmt"
+ "os"
+
+ "github.com/stretchr/testify/require"
)
func TestSeq(t *testing.T) {
diff --git a/parser.go b/parser.go
index fbdf8ec..f008d33 100644
--- a/parser.go
+++ b/parser.go
@@ -179,12 +179,12 @@ func parseMatcher(matcher string) (alphabet string, ranges [][]rune) {
}
i += 3 // we just consumed 3 bytes: range start, hyphen, and range end
continue
- }else if i+1 < len(runes) && runes[i] == '\\' {
+ } else if i+1 < len(runes) && runes[i] == '\\' {
alphabet += string(runes[i+1])
i += 2 // we just consumed 2 bytes: escape and the char
} else {
alphabet += string(runes[i])
- i +=1
+ i++
}
}