コード例 #1
0
            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))));
            }
コード例 #2
0
 public AssignExpr(AssignableExpr target, Expr val)
 {
     _target = target;
     _val = val;
 }
コード例 #3
0
 public AssignExpr(AssignableExpr target, Expr val)
 {
     _target = target;
     _val    = val;
 }