Beispiel #1
0
 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();
 }
Beispiel #2
0
 public static void EmitYieldReturn(AbstractEmitterBlock block, IType returnType)
 {
     block.EndFunctionBlock();
     block.WriteComma();
     if (returnType.TypeArguments.Count > 0)
     {
         block.Write(BridgeTypes.ToJsName(returnType.TypeArguments[0], block.Emitter));
     }
     else
     {
         block.Write("System.Object");
     }
     block.WriteCloseParentheses();
     block.WriteNewLine();
 }
Beispiel #3
0
 public static void EmitYieldReturn(AbstractEmitterBlock block, IType returnType)
 {
     block.EndFunctionBlock();
     block.WriteCloseParentheses();
     block.WriteNewLine();
 }