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();
         }
     }
 }
Beispiel #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();
 }
Beispiel #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();
        }
Beispiel #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();
 }
Beispiel #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();
 }
Beispiel #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();
 }
 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();
 }
Beispiel #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();
     }
 }
Beispiel #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);
        }
Beispiel #13
0
 protected override void LLWrite(ICodeWriter writer, object o)
 {
     writer.EndLine();
     writer.BeginNewLine(true);
 }