UNPKG
mca-compiler
Version:
latest (0.2.0)
0.2.0
0.1.0
Compiles MCA code to MCIL
github.com/toxic-spanner/MCA
toxic-spanner/MCA
mca-compiler
/
nodes
/
BlockStatement.js
12 lines
(10 loc)
•
260 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
var
Block
=
require
(
'../types/Block'
);
exports
.
type
=
"BlockStatement"
;
exports
.
call
=
function
(
node, ctx, execute
) {
var
obj = {}; obj[node.
params
.
length
] = {
params
: node.
params
,
block
: node.
body
};
return
new
Block
(obj); };