public static void EmitYield(AbstractEmitterBlock block, IType returnType) { block.WriteReturn(true); block.Write(LuaHelper.Root + ".yieldEnumerator"); block.WriteOpenParentheses(); block.WriteFunction(); block.WriteOpenCloseParentheses(); block.BeginFunctionBlock(); }
public static void EmitYield(AbstractEmitterBlock block, IType returnType, MethodDeclaration methodDeclaration) { block.WriteReturn(true); block.Write(LuaHelper.Root, ".yield", returnType.Name); block.WriteOpenParentheses(); block.WriteFunction(); block.WriteOpenParentheses(); AbstractMethodBlock.EmitMethodParameters(block, methodDeclaration.Parameters, methodDeclaration); block.WriteCloseParentheses(); block.BeginFunctionBlock(); }