1
0
Fork 0

Don't add wrapping quotes to string value

This commit is contained in:
Gregory Eremin 2015-02-17 00:05:49 +07:00
parent b6eceb5dcd
commit 257f3c42a9
1 changed files with 3 additions and 0 deletions

View File

@ -257,6 +257,7 @@ func lexNumber(l *Lexer) stateFn {
}
func lexString(l *Lexer) stateFn {
l.ignore()
escaped := false
for {
switch r := l.next(); r {
@ -266,7 +267,9 @@ func lexString(l *Lexer) stateFn {
if escaped {
escaped = false
} else {
l.backup() // Going before closing quote
l.emit(String)
l.next() // Skipping closing quote
return lexInitial
}
case '\n':