diff options
Diffstat (limited to 'vendor/github.com/homemade')
-rw-r--r--[-rwxr-xr-x] | vendor/github.com/homemade/scl/scope.go | 0 | ||||
-rw-r--r-- | vendor/github.com/homemade/scl/tokeniser.go | 10 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/homemade/scl/scope.go b/vendor/github.com/homemade/scl/scope.go index e8105ae..e8105ae 100755..100644 --- a/vendor/github.com/homemade/scl/scope.go +++ b/vendor/github.com/homemade/scl/scope.go 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 { |