Value value = (Value)evalTreeNode(result.getTree());
return value.type().name();
}
public static String inspect(String exp) {
ParseResult result = AstTreeFactory.getExpressionAst(exp);
if (result.hasError()) {
return result.getErrorMsg();
}
Value value = (Value)evalTreeNode(result.getTree());
StringBuilder sb = new StringBuilder();
if (value instanceof ObjectReference) {
sb.append(exp).append(" = ");
sb.append(value.type().name()).append("\n");