xo-interpreter: Object->TaggedPtr conversion (prep for primitives)
This commit is contained in:
parent
a49fe25ace
commit
0e2ddcf839
5 changed files with 45 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/** @file FunctionInterface.hpp
|
||||
/** @file ProcedureExprInterface.hpp
|
||||
*
|
||||
* Author: Roland Conybeare
|
||||
**/
|
||||
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
class FunctionExprInterface : public Expression {
|
||||
class ProcedureExprInterface : public Expression {
|
||||
public:
|
||||
FunctionExprInterface(exprtype extype, TypeDescr fn_type)
|
||||
ProcedureExprInterface(exprtype extype, TypeDescr fn_type)
|
||||
: Expression(extype, fn_type) {}
|
||||
|
||||
/** downcast from Expression **/
|
||||
static bp<FunctionExprInterface> from(bp<Expression> x) {
|
||||
return bp<FunctionExprInterface>::from(x);
|
||||
static bp<ProcedureExprInterface> from(bp<Expression> x) {
|
||||
return bp<ProcedureExprInterface>::from(x);
|
||||
}
|
||||
|
||||
virtual const std::string & name() const = 0;
|
||||
|
|
@ -30,4 +30,4 @@ namespace xo {
|
|||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/** end FunctionInterface.hpp **/
|
||||
/** end ProcedureExprInterface.hpp **/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue