Skip to content
Snippets Groups Projects
Commit 189d4573 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

throw proper errors when eval’ing symbols

parent 7907ab3b
No related branches found
No related tags found
No related merge requests found
......@@ -372,8 +372,12 @@ final class REngine implements Engine, Engine.Timings {
for (int i = 0; i < exprs.getLength(); i++) {
Object obj = exprs.getDataAt(i);
if (obj instanceof RSymbol) {
result = ReadVariableNode.lookupAny(((RSymbol) obj).getName(), envir.getFrame(), false);
String identifier = ((RSymbol) obj).getName();
result = ReadVariableNode.lookupAny(identifier, envir.getFrame(), false);
caller.setVisibility(true);
if (result == null) {
throw RError.error(RError.SHOW_CALLER, RError.Message.ARGUMENT_MISSING, identifier);
}
} else if (obj instanceof RLanguage) {
result = evalNode(((RLanguage) obj).getRep().asRSyntaxNode(), envir, caller);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment