public Expr Parse(ParserContext pcon, object frm) { ISeq form = (ISeq)frm; if (RT.Length(form) != 3) { throw new ParseException("Malformed assignment, expecting (set! target val)"); } Expr target = Compiler.Analyze(new ParserContext(RHC.Expression, true), RT.second(form)); AssignableExpr ae = target as AssignableExpr; if (ae == null) { throw new ParseException("Invalid assignment target"); } return(new AssignExpr(ae, Compiler.Analyze(pcon.SetRhc(RHC.Expression), RT.third(form)))); }
public AssignExpr(AssignableExpr target, Expr val) { _target = target; _val = val; }
public AssignExpr(AssignableExpr target, Expr val) { _target = target; _val = val; }