1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// -*- C++ -*- %module tiger_astclone %import "tiger_ast.i" %{ #include <astclone/libastclone.hh> #include "swig_real_type.hh" %} %inline { ast::Ast* clone(const ast::Ast& tree) { return astclone::clone<ast::Ast>(tree); } }