aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/homemade/scl/tokeniser.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/homemade/scl/tokeniser.go')
-rw-r--r--vendor/github.com/homemade/scl/tokeniser.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/homemade/scl/tokeniser.go b/vendor/github.com/homemade/scl/tokeniser.go
index 684c7dd..0986ef8 100644
--- a/vendor/github.com/homemade/scl/tokeniser.go
+++ b/vendor/github.com/homemade/scl/tokeniser.go
@@ -32,7 +32,7 @@ func (t *tokeniser) resetComment() {
func (t *tokeniser) stripComments(l *scannerLine) string {
- lastQuote := rune(0)
+ lastQuote := []rune{rune(0)}
slash := rune(47)
slashCount := 0
@@ -43,15 +43,15 @@ func (t *tokeniser) stripComments(l *scannerLine) string {
c := rune(v)
switch {
- case c == lastQuote:
- lastQuote = rune(0)
+ case c == lastQuote[0]:
+ lastQuote = lastQuote[1:]
slashCount = 0
case unicode.In(c, unicode.Quotation_Mark):
- lastQuote = c
+ lastQuote = append([]rune{c}, lastQuote...)
slashCount = 0
- case c == slash && lastQuote == rune(0):
+ case c == slash && lastQuote[0] == rune(0):
slashCount++
if slashCount == 2 {