func lexQuotedString(t *Tokeniser) stateFunc {
	_, wR := t.currentRune()
	t.advance(wR)
	t.ignore() // ignore the opening quote

	// break only when we see the second quote
	for r, w := t.currentRune(); r != '\'' && r != '"'; r, w = t.currentRune() {
		if r == '\\' {
			r2, w2 := runeAtPosition(t.Input, t.pos+w)
			if r2 == '\n' || r2 == eof || r2 == '\'' {
				// escape character unterminated, next char r2 is eof, newline or
				// the quote itself.
				t.advance(w + w2)
				t.emitErrorf("unterminated quoted string due to escape char")
				return nil
			}
		}
		// normally advance through the string
		t.advance(w)
	}
	t.emit(STR)
	_, wR = t.currentRune()
	t.advance(wR)
	t.ignore() // ignore the closing quote
	return lexCode
}
// lexQuotedString scans a quoted string, can be escaped using the '\' character
lexQuotedString scans a quoted string, can be escaped using the '\' character
// lexQuotedString scans a quoted string can be escaped using the ' \ ' character
func lexQuotedString(t *Tokeniser) stateFunc {
	_, wR := t.currentRune()
	t.advance(wR)
	t.ignore() 
	for r, w := t.currentRune(); r != '\'' && r != '"'; r, w = t.currentRune() {
		if r == '\\' {
			r2, w2 := runeAtPosition(t.Input, t.pos+w)
			if r2 == '\n' || r2 == eof || r2 == '\'' {
				t.advance(w + w2)
				t.emitErrorf("unterminated quoted string due to escape char")
				return nil
			}
		}
		t.advance(w)
	}
	t.emit(STR)
	_, wR = t.currentRune()
	t.advance(wR)
	t.ignore() 
	return lexCode
}
func lexQuotedString ( t * Tokeniser ) stateFunc { _ , wR := t . currentRune ( ) t . advance ( wR ) t . ignore ( ) for r , w := t . currentRune ( ) ; r != '\'' && r != '"' ; r , w = t . currentRune ( ) { if r == '\\' { r2 , w2 := runeAtPosition ( t . Input , t . pos + w ) if r2 == '\n' || r2 == eof || r2 == '\'' { t . advance ( w + w2 ) t . emitErrorf ( " " ) return nil } } t . advance ( w ) } t . emit ( STR ) _ , wR = t . currentRune ( ) t . advance ( wR ) t . ignore ( ) return lexCode }
lexQuotedString scans a quoted string, can be escaped using the '\' character
lexQuotedString scans a quoted string can be escaped using the ' \ ' character
// ignore the opening quote // break only when we see the second quote // escape character unterminated, next char r2 is eof, newline or // the quote itself. // normally advance through the string // ignore the closing quote