public string ToWorkshop(OutputLanguage language, bool optimize)
        {
            Element a = Value1;
            Element b = Value2;

            if (optimize)
            {
                a = a.Optimize();
                b = b.Optimize();
            }

            return(a.ToWorkshop(language) + " " + CompareOperator.ToWorkshop(language) + " " + b.ToWorkshop(language));
        }
Ejemplo n.º 2
0
        public void ToWorkshop(WorkshopBuilder builder)
        {
            string result = string.Empty;

            // Add a comment and newline
            if (Comment != null)
            {
                builder.AppendLine($"\"{Comment}\"\n");
            }

            Value1.ToWorkshop(builder, ToWorkshopContext.ConditionValue);
            builder.Append(" ");
            CompareOperator.ToWorkshop(builder, ToWorkshopContext.Other);
            builder.Append(" ");
            Value2.ToWorkshop(builder, ToWorkshopContext.ConditionValue);
            builder.Append(";");
            builder.AppendLine();
        }
Ejemplo n.º 3
0
 public string ToWorkshop()
 {
     return(Value1.ToWorkshop() + " " + CompareOperator.ToWorkshop() + " " + Value2.ToWorkshop());
 }
Ejemplo n.º 4
0
 public void DebugPrint(Log log, int depth = 0)
 {
     Value1.DebugPrint(log, depth);
     log.Write(LogLevel.Verbose, new ColorMod(new string(' ', depth * 4) + CompareOperator.ToWorkshop(), ConsoleColor.DarkYellow));
     Value2.DebugPrint(log, depth);
 }
 public string ToWorkshop(OutputLanguage language)
 {
     return(Value1.Optimize().ToWorkshop(language) + " " + CompareOperator.ToWorkshop(language) + " " + Value2.Optimize().ToWorkshop(language));
 }