예제 #1
0
        // Delete once migrated to PastelContext
        internal string GetFunctionDeclarationsTEMP(Transpilers.TranspilerContext ctx, string indent)
        {
            foreach (FunctionDefinition fd in this.GetFunctionDefinitions())
            {
                ctx.Transpiler.GenerateCodeForFunctionDeclaration(ctx, fd, true);
                ctx.Append(ctx.Transpiler.NewLine);
            }

            return(Indent(ctx.FlushAndClearBuffer().Trim(), ctx.Transpiler.NewLine, indent));
        }
예제 #2
0
        // Delete once migrated to PastelContext
        internal Dictionary <string, string> GetStructCodeByClassTEMP(Transpilers.TranspilerContext ctx, string indent)
        {
            Dictionary <string, string> output = new Dictionary <string, string>();

            foreach (StructDefinition sd in this.GetStructDefinitions())
            {
                string name = sd.NameToken.Value;
                ctx.Transpiler.GenerateCodeForStruct(ctx, sd);
                output[name] = ctx.FlushAndClearBuffer();
            }
            return(output);
        }
예제 #3
0
        internal Dictionary <string, string> GetFunctionCodeAsLookupTEMP(Transpilers.TranspilerContext ctx, string indent)
        {
            Dictionary <string, string> output = new Dictionary <string, string>();

            foreach (FunctionDefinition fd in this.GetFunctionDefinitions())
            {
                ctx.Transpiler.GenerateCodeForFunction(ctx, fd, true);
                output[fd.NameToken.Value] = Indent(ctx.FlushAndClearBuffer().Trim(), ctx.Transpiler.NewLine, indent);
            }

            return(output);
        }
예제 #4
0
        // Delete once migrated to PastelContext
        internal string GetFunctionCodeTEMP(Transpilers.TranspilerContext ctx, string indent)
        {
            foreach (FunctionDefinition fd in this.GetFunctionDefinitions())
            {
                if (!alreadySerializedFunctions.Contains(fd))
                {
                    this.Transpiler.GenerateCodeForFunction(ctx, fd);
                    ctx.Append(this.Transpiler.NewLine);
                }
            }

            return(Indent(ctx.FlushAndClearBuffer().Trim(), this.Transpiler.NewLine, indent));
        }
예제 #5
0
        internal string GetFunctionCodeForSpecificFunctionAndPopItFromFutureSerializationTEMP(
            string name,
            string swapOutWithNewNameOrNull,
            Transpilers.TranspilerContext ctx,
            string indent)
        {
            FunctionDefinition fd = this.GetFunctionDefinitions().Where(f => f.NameToken.Value == name).FirstOrDefault();

            if (fd == null || this.alreadySerializedFunctions.Contains(fd))
            {
                return(null);
            }

            this.alreadySerializedFunctions.Add(fd);

            if (swapOutWithNewNameOrNull != null)
            {
                fd.NameToken = Token.CreateDummyToken(swapOutWithNewNameOrNull);
            }

            this.Transpiler.GenerateCodeForFunction(ctx, fd);
            return(Indent(ctx.FlushAndClearBuffer().Trim(), this.Transpiler.NewLine, indent));
        }
예제 #6
0
 public abstract void TranslateFloatBuffer16(TranspilerContext sb);
예제 #7
0
 public abstract void TranslateExpressionAsExecutable(TranspilerContext sb, Expression expression);
예제 #8
0
 public abstract void TranslateExtensibleCallbackInvoke(TranspilerContext sb, Expression name, Expression argsArray);
예제 #9
0
 public abstract void TranslateEmitComment(TranspilerContext sb, string value);
예제 #10
0
 public abstract void TranslateCharConstant(TranspilerContext sb, char value);
예제 #11
0
 public abstract void TranslateBooleanNot(TranspilerContext sb, UnaryOp unaryOp);
예제 #12
0
 public abstract void TranslateFloatToString(TranspilerContext sb, Expression floatExpr);
예제 #13
0
 public abstract void TranslateDictionaryRemove(TranspilerContext sb, Expression dictionary, Expression key);
예제 #14
0
 public abstract void TranslateDictionaryNew(TranspilerContext sb, PType keyType, PType valueType);
예제 #15
0
 public abstract void TranslateDictionaryContainsKey(TranspilerContext sb, Expression dictionary, Expression key);
예제 #16
0
 public abstract void TranslateCurrentTimeSeconds(TranspilerContext sb);
예제 #17
0
 public abstract void TranslateConstructorInvocation(TranspilerContext sb, ConstructorInvocation constructorInvocation);
예제 #18
0
 public abstract void TranslateChr(TranspilerContext sb, Expression charCode);
예제 #19
0
 public abstract void TranslateCharToString(TranspilerContext sb, Expression charValue);
예제 #20
0
 public abstract void TranslateFloatConstant(TranspilerContext sb, double value);
예제 #21
0
 public abstract void TranslateFloatDivision(TranspilerContext sb, Expression floatNumerator, Expression floatDenominator);
예제 #22
0
 public abstract void TranslateBreak(TranspilerContext sb);
예제 #23
0
 public abstract void TranslateFunctionInvocationWithPrefix(TranspilerContext sb, string prefix, FunctionReference funcRef, Expression[] args);
예제 #24
0
 public abstract void TranslateBooleanConstant(TranspilerContext sb, bool value);
예제 #25
0
 public abstract void TranslateDictionarySet(TranspilerContext sb, Expression dictionary, Expression key, Expression value);
예제 #26
0
 public abstract void TranslateCast(TranspilerContext sb, PType type, Expression expression);
예제 #27
0
 public abstract void TranslateDictionaryTryGet(TranspilerContext sb, Expression dictionary, Expression key, Expression fallbackValue, Variable varOut);
예제 #28
0
 public abstract void TranslateDictionaryValues(TranspilerContext sb, Expression dictionary);
예제 #29
0
 internal string GetGlobalsCodeTEMP(Transpilers.TranspilerContext ctx, string indent)
 {
     this.Transpiler.GenerateCodeForGlobalsDefinitions(ctx, this.GetGlobalsDefinitions());
     return(Indent(ctx.FlushAndClearBuffer().Trim(), this.Transpiler.NewLine, indent));
 }
예제 #30
0
 public abstract void TranslateBase64ToString(TranspilerContext sb, Expression base64String);