From b1d602f733f9be7810a7634b3d72c6f994860e0c Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Tue, 10 Dec 2013 19:35:47 +0100 Subject: [PATCH] Add missing string escape sequences --- lexer.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lexer.go b/lexer.go index c3a145c..91f93c9 100644 --- a/lexer.go +++ b/lexer.go @@ -332,6 +332,15 @@ func lexString(l *lexer) stateFn { } else if l.follow("\\n") { l.pos += 1 growing_string += "\n" + } else if l.follow("\\b") { + l.pos += 1 + growing_string += "\b" + } else if l.follow("\\f") { + l.pos += 1 + growing_string += "\f" + } else if l.follow("\\/") { + l.pos += 1 + growing_string += "/" } else if l.follow("\\t") { l.pos += 1 growing_string += "\t"