protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     if (CaseExpr != null)
     {
         writer.Write("case ", true);
         CaseExpr.WriteAll(writer);
     }
     else
     {
         writer.Write("default", true);
     }
     writer.Write(" : ", true);
     if (Actions != null)
     {
         if (Actions is ICodeElementSet)
         {
             writer.EndLine();
             writer.Indent();
             writer.BeginNewLine(true);
         }
         Actions.WriteAll(writer);
         writer.EndLine();
         if (Actions is ICodeElementSet)
         {
             writer.Exdent();
         }
     }
 }
Esempio n. 2
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     writer.Write("catch ", false);
     if (CatchExpr != null)
     {
         CatchExpr.WriteAll(writer);
     }
     writer.EndLine();
     Body.WriteAll(writer);
     writer.EndLine();
 }
Esempio n. 3
0
        protected override void LLWrite(ICodeWriter writer, object o)
        {
            writer.BeginNewLine(true);
            if (Name != null)
            {
                Name.WriteAll(writer);
            }
            else
            {
                Subscript.WriteAll(writer);
            }

            if (TypeAnnotation != null)
            {
                writer.Write(": ", true);
                TypeAnnotation.WriteAll(writer);
            }

            if (Value != null)
            {
                writer.Write(" = ", true);
                Value.WriteAll(writer);
            }
            writer.EndLine();
        }
Esempio n. 4
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     Contents.WriteAll(writer);
     writer.Write(';', false);
     writer.EndLine();
 }
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     writer.Write("if (", false);
     Condition.WriteAll(writer);
     writer.Write(")", false);
     writer.EndLine();
 }
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     writer.Write("catch ", false);
     if ((object)CatchType != null)
     {
         writer.Write("(", false);
         CatchType.WriteAll(writer);
         if ((object)Name != null)
         {
             SimpleElememt.Spacer.WriteAll(writer);
             Name.WriteAll(writer);
         }
         writer.Write(")", false);
     }
     writer.EndLine();
     Body.WriteAll(writer);
     writer.EndLine();
 }
Esempio n. 7
0
 public void Write(ICodeWriter writer, object o)
 {
     if (indent)
     {
         writer.Indent();
     }
     writer.BeginNewLine(prependIndents);
     writer.Write(Contents, allowSplit);
     writer.EndLine();
 }
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     writer.Write(CSMethod.VisibilityToString(Visibility), false);
     writer.Write(" delegate ", true);
     Type.WriteAll(writer);
     writer.Write(' ', true);
     Name.WriteAll(writer);
     writer.Write('(', true);
     Parameters.WriteAll(writer);
     writer.Write(')', true);
     writer.Write(';', false);
     writer.EndLine();
 }
Esempio n. 9
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     if (OnOwnLine)
     {
         writer.BeginNewLine(true);
     }
     else
     {
         SimpleElememt.Spacer.Write(writer, o);
     }
     writer.Write("// ", false);
     writer.Write(Contents, false);
     writer.EndLine();
 }
Esempio n. 10
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.BeginNewLine(true);
     writer.Write("foreach (", false);
     if (Type != null)
     {
         Type.WriteAll(writer);
     }
     else
     {
         writer.Write("var", false);
     }
     SimpleElememt.Spacer.WriteAll(writer);
     Ident.WriteAll(writer);
     writer.Write(" in ", true);
     Expr.WriteAll(writer);
     writer.Write(")", false);
     writer.EndLine();
 }
Esempio n. 11
0
 public override void Write(ICodeWriter writer, object o)
 {
     if (StartDecoration != null)
     {
         if (startOnOwnLine)
         {
             writer.BeginNewLine(true);
         }
         writer.Write(StartDecoration, true);
         if (startOnOwnLine)
         {
             writer.EndLine();
         }
     }
     if (indent)
     {
         writer.Indent();
     }
 }
Esempio n. 12
0
        public override void EndWrite(ICodeWriter writer, object o)
        {
            if (indent)
            {
                writer.Exdent();
            }
            if (EndDecoration != null)
            {
                if (endOnOwnLine)
                {
                    writer.BeginNewLine(true);
                }
                writer.Write(EndDecoration, true);
                if (endOnOwnLine)
                {
                    writer.EndLine();
                }
            }

            base.EndWrite(writer, o);
        }
Esempio n. 13
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.EndLine();
     writer.BeginNewLine(true);
 }