lib/rgen/instantiator/json_parser.y in rgen-0.5.2 vs lib/rgen/instantiator/json_parser.y in rgen-0.5.3
- old
+ new
@@ -62,9 +62,14 @@
when /\A"((?:[^"\\]|\\"|\\\\|\\[^"\\])*)"/
str = $'
sval = $1
sval.gsub!('\\\\','\\')
sval.gsub!('\\"','"')
+ sval.gsub!('\\n',"\n")
+ sval.gsub!('\\r',"\r")
+ sval.gsub!('\\t',"\t")
+ sval.gsub!('\\f',"\f")
+ sval.gsub!('\\b',"\b")
@q << [:STRING, ParserToken.new(line, file, sval)]
when /\A(\{|\}|\[|\]|,|:|true|false)/
str = $'
@q << [$1, ParserToken.new(line, file, $1)]
else