/NRefactory/ICSharpCode.NRefactory.VB/OutputVisitor/IOutputFormatter.cs

http://github.com/icsharpcode/ILSpy · C# · 44 lines · 19 code · 9 blank · 16 comment · 0 complexity · 0c8c3f2efb378dc43a33d0cf6d7b4e17 MD5 · raw file

  1. // Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
  2. // This code is distributed under MIT X11 license (for details please see \doc\license.txt)
  3. using System;
  4. namespace ICSharpCode.NRefactory.VB
  5. {
  6. /// <summary>
  7. /// Output formatter for the Output visitor.
  8. /// </summary>
  9. public interface IOutputFormatter
  10. {
  11. void StartNode(AstNode node);
  12. void EndNode(AstNode node);
  13. /// <summary>
  14. /// Writes an identifier.
  15. /// If the identifier conflicts with a keyword, the output visitor will
  16. /// call <c>WriteToken("[")</c> before and <c>WriteToken("]")</c> after calling WriteIdentifier().
  17. /// </summary>
  18. void WriteIdentifier(string identifier);
  19. /// <summary>
  20. /// Writes a keyword to the output.
  21. /// </summary>
  22. void WriteKeyword(string keyword);
  23. /// <summary>
  24. /// Writes a token to the output.
  25. /// </summary>
  26. void WriteToken(string token);
  27. void Space();
  28. void Indent();
  29. void Unindent();
  30. void NewLine();
  31. void WriteComment(bool isDocumentation, string content);
  32. void MarkFoldStart();
  33. void MarkFoldEnd();
  34. }
  35. }