xo-expression: naming: {Primitive,Function}ExprInterface
This commit is contained in:
parent
50649268a4
commit
a49fe25ace
5 changed files with 18 additions and 21 deletions
33
include/xo/expression/FunctionExprInterface.hpp
Normal file
33
include/xo/expression/FunctionExprInterface.hpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/** @file FunctionInterface.hpp
|
||||
*
|
||||
* Author: Roland Conybeare
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Expression.hpp"
|
||||
//#include <cstdint>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
class FunctionExprInterface : public Expression {
|
||||
public:
|
||||
FunctionExprInterface(exprtype extype, TypeDescr fn_type)
|
||||
: Expression(extype, fn_type) {}
|
||||
|
||||
/** downcast from Expression **/
|
||||
static bp<FunctionExprInterface> from(bp<Expression> x) {
|
||||
return bp<FunctionExprInterface>::from(x);
|
||||
}
|
||||
|
||||
virtual const std::string & name() const = 0;
|
||||
virtual int n_arg() const = 0; // { return this->value_td()->n_fn_arg(); }
|
||||
virtual TypeDescr fn_retval() const = 0; // { return this->value_td()->fn_retval(); }
|
||||
virtual TypeDescr fn_arg(uint32_t i) const = 0; // { return this->value_td()->fn_arg(i); }
|
||||
|
||||
private:
|
||||
}; /*FunctionInterface*/
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/** end FunctionInterface.hpp **/
|
||||
Loading…
Add table
Add a link
Reference in a new issue