Open hcnelson99 opened 6 years ago
Similar test case:
require stdout
if (true)
stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("error"),
stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("good")
else
unit
Observed behavior:
Error when running parseExpression on input "stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("error"),
stdout.print("good")
stdout.print("good")
stdout.print("good")
stdout.print("good")
"
Exception in thread "main" java.lang.NullPointerException
at wyvern.tools.parsing.DSLLit.generateIL(DSLLit.java:104)
at wyvern.tools.parsing.DSLLit.generateIL(DSLLit.java:30)
at wyvern.tools.typedAST.core.expressions.Application.generateILForTuples(Application.java:173)
at wyvern.tools.typedAST.core.expressions.Application.generateIL(Application.java:115)
at wyvern.tools.typedAST.interfaces.ExpressionAST.genTopLevel(ExpressionAST.java:28)
at wyvern.tools.typedAST.core.Sequence.genTopLevel(Sequence.java:288)
at wyvern.tools.typedAST.core.Script.generateIL(Script.java:49)
at wyvern.target.corewyvernIL.support.ModuleResolver.load(ModuleResolver.java:238)
at wyvern.tools.Interpreter.main(Interpreter.java:61)
This one prints the body of the if but doesn't give the line number of the error.
Test case:
Observed behavior:
Expected behavior: error message with line number