feat: add binary_trees benchmark suite and fix string escape for tab character

Add Lua, Python, Ruby, and Wren implementations of the binary_trees benchmark from the Computer Language Benchmarks Game. Update the benchmark runner to support multiple benchmarks with output validation, and fix the Wren compiler to handle the '\t' escape sequence in string literals.
This commit is contained in:
Bob Nystrom
2013-11-30 00:19:13 +00:00
parent f0f74c6785
commit 50b1a381e0
6 changed files with 240 additions and 17 deletions
+2 -1
View File
@@ -401,12 +401,13 @@ static void readString(Parser* parser)
case '"': addStringChar(parser, '"'); break;
case '\\': addStringChar(parser, '\\'); break;
case 'n': addStringChar(parser, '\n'); break;
case 't': addStringChar(parser, '\t'); break;
default:
// TODO(bob): Emit error token.
break;
}
// TODO(bob): Other escapes (/t, /r, etc.), Unicode escape sequences.
// TODO(bob): Other escapes (\r, etc.), Unicode escape sequences.
}
else
{