(quote rune)
| 252 | } |
| 253 | |
| 254 | func (l *Lexer) scanString(quote rune) (n int) { |
| 255 | ch := l.next() // read character after quote |
| 256 | for ch != quote { |
| 257 | if ch == '\n' || ch == eof { |
| 258 | l.error("literal not terminated") |
| 259 | return |
| 260 | } |
| 261 | if ch == '\\' { |
| 262 | ch = l.scanEscape(quote) |
| 263 | } else { |
| 264 | ch = l.next() |
| 265 | } |
| 266 | n++ |
| 267 | } |
| 268 | return |
| 269 | } |
| 270 | |
| 271 | func (l *Lexer) scanRawString(quote rune) (n int) { |
| 272 | var escapedQuotes int |
no test coverage detected