clojure.lang.CljCompiler.Ast.ParserContext.SetAssign C# (CSharp) Метод

SetAssign() публичный Метод

public SetAssign ( bool value ) : ParserContext
value bool
Результат ParserContext
        public ParserContext SetAssign(bool value)
        {
            if (_isAssignContext == value)
                return this;

            return new ParserContext(_rhc, value);
        }

Usage Example

Пример #1
0
            public Expr Parse(ParserContext pcon, object frm)
            {
                ISeq form = (ISeq)frm;

                // (if test then) or (if test then else)

                if (form.count() > 4)
                {
                    throw new ParseException("Too many arguments to if");
                }

                if (form.count() < 3)
                {
                    throw new ParseException("Too few arguments to if");
                }


                Expr testExpr = Compiler.Analyze(pcon.EvalOrExpr().SetAssign(false), RT.second(form));
                Expr thenExpr = Compiler.Analyze(pcon.SetAssign(false), RT.third(form));
                Expr elseExpr = Compiler.Analyze(pcon.SetAssign(false), RT.fourth(form));

                return(new IfExpr((IPersistentMap)Compiler.SourceSpanVar.deref(), testExpr, thenExpr, elseExpr));
            }
All Usage Examples Of clojure.lang.CljCompiler.Ast.ParserContext::SetAssign