OSDN Git Service

use binding.program for override module
[happyabc/happyabc.git] / scm / src / codegen / override.mlip
1 type 'expr expr = 'expr Binding.expr
2
3 type 'expr method_ = ('expr Ast.method_) * [`Override] list
4 type ('expr,'stmt) stmt =
5     [ `Define of Module.stmt_name * 'expr
6     | `Expr of 'expr
7     | `ReDefine of Module.stmt_name * int * 'expr
8     | `Class of (Module.stmt_name,'expr method_) Ast.class_ ]
9
10
11 #include <type.h>
12 val fold : FOLD(expr)
13 val lift : LIFT_NOREC(stmt)
14 val fold_stmt : FOLD_STMT_NOREC(stmt)
15
16 type expr' =
17     expr' expr
18 type stmt' =
19     (expr',stmt') stmt
20 type program =
21     stmt' list
22
23 val of_binding : Binding.program -> program