pseudo-states appear to be working + variables only exist within the scope where they are created
This commit is contained in:
parent
db1479bfc4
commit
d4930eb13d
22 changed files with 742 additions and 569 deletions
|
|
@ -42,5 +42,10 @@ export function evalExpr(expr: Expression, environment: Environment): any {
|
|||
const rhs = evalExpr(expr.rhs, environment);
|
||||
return BINARY_OPERATOR_MAP.get(expr.operator)!(lhs, rhs);
|
||||
}
|
||||
else if (expr.kind === "call") {
|
||||
const fn = evalExpr(expr.fn, environment);
|
||||
const param = evalExpr(expr.param, environment);
|
||||
return fn(param);
|
||||
}
|
||||
throw new Error("should never reach here");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue