// Writer Helpers these are the only methods that should directly access _writer private void WriteKeyword(string keyword, bool noSpace = false) { _writer.WriteKeyword(keyword); if (!noSpace) { WriteSpace(); } }
private static void WriteAccessor(ISyntaxWriter syntaxWriter, IMethodDefinition method) { var accessorKeyword = GetAccessorKeyword(method); syntaxWriter.WriteKeyword(accessorKeyword); syntaxWriter.WriteSymbol(";"); }
public static void WriteSyntaxToken(this ISyntaxWriter writer, SyntaxToken token) { switch (token.Type) { default: case SyntaxTokenType.Literal: writer.Write(token.Token); break; case SyntaxTokenType.Symbol: writer.WriteSymbol(token.Token); break; case SyntaxTokenType.Identifier: writer.WriteIdentifier(token.Token); break; case SyntaxTokenType.Keyword: writer.WriteKeyword(token.Token); break; case SyntaxTokenType.TypeName: writer.WriteTypeName(token.Token); break; } }