Boo.Lang.Compiler.Steps.GeneratorMethodProcessor.CreateYieldInvocation C# (CSharp) Method

CreateYieldInvocation() private method

private CreateYieldInvocation ( Expression value, int newState ) : MethodInvocationExpression
value Boo.Lang.Compiler.Ast.Expression
newState int
return Boo.Lang.Compiler.Ast.MethodInvocationExpression
        MethodInvocationExpression CreateYieldInvocation(Expression value, int newState)
        {
            MethodInvocationExpression invocation = CodeBuilder.CreateMethodInvocation(
                CodeBuilder.CreateSelfReference(_enumerator.Entity),
                _yield,
                CodeBuilder.CreateIntegerLiteral(newState),
                value == null ? GetDefaultYieldValue() : value);
            if (null != value) invocation.LexicalInfo = value.LexicalInfo;
            return invocation;
        }