calcium-lang
Version:
Calcium language interpreter
20 lines • 421 B
JavaScript
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