xo-interpreter: + expression sequences
This commit is contained in:
parent
498dd6a54e
commit
7ee41a4b71
7 changed files with 158 additions and 4 deletions
|
|
@ -17,6 +17,10 @@ namespace xo {
|
|||
expr_v_(xv) {}
|
||||
|
||||
static rp<Sequence> make(const std::vector<rp<Expression>> & xv) { return new Sequence(xv); }
|
||||
/** downcast from Expression **/
|
||||
static bp<Sequence> from(bp<Expression> x) {
|
||||
return bp<Sequence>::from(x);
|
||||
}
|
||||
|
||||
std::size_t size() const { return expr_v_.size(); }
|
||||
const rp<Expression> & operator[](std::size_t i) const { return expr_v_[i]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue