We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9aa0d4 commit 970586fCopy full SHA for 970586f
lexer.go
@@ -512,7 +512,7 @@ func (l *Lexer) consumeQuotedContent(q string, raw, unicode bool, name string) s
512
}
513
514
if c == '\n' && len(q) != 3 {
515
- l.panicfAtPosition(token.Pos(l.pos), token.Pos(l.pos+i+1), "unclosed %s: newline appears in non triple-quoted", name)
+ l.panicfAtPosition(token.Pos(l.pos), token.Pos(l.pos+i), "unclosed %s: newline appears in non triple-quoted", name)
516
517
518
content = append(content, c)
lexer_test.go
@@ -149,8 +149,8 @@ var lexerWrongTestCase = []struct {
149
{"\b", 0, 0, "illegal input character: '\\b'"},
150
{`"foo`, 0, 4, "unclosed string literal"},
151
{`R"foo`, 1, 5, "unclosed raw string literal"},
152
- {"'foo\n", 0, 5, "unclosed string literal: newline appears in non triple-quoted"},
153
- {"R'foo\n", 1, 6, "unclosed raw string literal: newline appears in non triple-quoted"},
+ {"'foo\n", 0, 4, "unclosed string literal: newline appears in non triple-quoted"},
+ {"R'foo\n", 1, 5, "unclosed raw string literal: newline appears in non triple-quoted"},
154
{"R'foo\\", 5, 6, "invalid escape sequence: \\<eof>"},
155
{`"\400"`, 1, 3, "invalid escape sequence: \\4"},
156
{`"\3xx"`, 1, 4, "invalid escape sequence: octal escape sequence must be follwed by 3 octal digits"},
0 commit comments