update tests and fix some

This commit is contained in:
Ilya Rezvov
2023-08-23 22:58:19 -06:00
parent 7fab53969a
commit be13488f69
4 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -299,7 +299,9 @@ endBlockComment _inp _len = do
alexMonadScan
startStringLiteral :: AlexAction Lexeme
startStringLiteral _inp _len = do
startStringLiteral (_, prev, _, _) _len = do
when (prev `notElem` "() \x09\x0A\x0D")
$ alexError "string literal should start after space or parent character"
alexSetStartCode stringLiteral
setLexerStringFlag True
alexMonadScan
+1
View File
@@ -56,6 +56,7 @@ runScript onAssertFail script = do
(st, inst) <- Interpreter.makeHostModule Interpreter.emptyStore [
("print", hostPrint []),
("print_i32", hostPrint [Struct.I32]),
("print_i64", hostPrint [Struct.I64]),
("print_i32_f32", hostPrint [Struct.I32, Struct.F32]),
("print_f64_f64", hostPrint [Struct.F64, Struct.F64]),
("print_f32", hostPrint [Struct.F32]),