private void EndLineWithSemi() { if (!suppressSemi) { writer.Write(";"); TerminateLine(); } }
public void VisitArrayIndexer(CodeArrayIndexerExpression aref) { Write(aref.TargetObject, PrecPrimary); writer.Write("["); var sep = ""; foreach (var sub in aref.Indices) { writer.Write(sep); sep = ","; Write(sub, PrecBase); } writer.Write("]"); }
public int VisitField(CodeMemberField field) { RenderMemberFieldAttributes(field.Attributes); var expWriter = new CSharpExpressionWriter(writer); expWriter.VisitTypeReference(field.FieldType); writer.Write(" "); writer.WriteName(field.FieldName); if (field.InitExpression != null) { writer.Write(" = "); field.InitExpression.Accept(expWriter); } writer.Write(";"); writer.WriteLine(); return(0); }