UNPKG

calcium-lang

Version:
20 lines 421 B
import evaluate from "../util/evaluate"; /** * the command of assignemnt */ export default class Assign { /** * * @param lhs left hand side * @param rhs right hand side */ constructor(lhs, rhs) { this.lhs = lhs; this.rhs = rhs; } execute(env) { const rhs = evaluate(this.rhs, env); this.lhs.assign(rhs, env); } } //# sourceMappingURL=assign.js.map