From 30802e07b2d84fbc213b490d3402707dffe60096 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Mon, 10 Apr 2017 21:18:42 +0100 Subject: update dependencies --- vendor/github.com/homemade/scl/tokeniser.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/homemade/scl/tokeniser.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 { -- cgit v1.2.3