public void VisitArrayIndexer(CodeArrayIndexerExpression aref) { Write(aref.TargetObject, Precedence.Primary, false); writer.Write("["); var sep = ""; foreach (var sub in aref.Indices) { writer.Write(sep); sep = ","; Write(sub, Precedence.Base, false); } 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); }
private void EndLineWithSemi() { if (!suppressSemi) { writer.Write(";"); TerminateLine(); } }