tree: 50d8f0f173ac3507c5de744b5d70219c315fceba
  1. align.cc
  2. align.h
  3. BUILD
  4. comment-controls.cc
  5. comment-controls.h
  6. comment-controls_test.cc
  7. format-style-init.cc
  8. format-style-init.h
  9. format-style.h
  10. formatter-test-utils.h
  11. formatter-tuning_test.cc
  12. formatter.cc
  13. formatter.h
  14. formatter_align_test.cc
  15. formatter_class_package_test.cc
  16. formatter_disable_test.cc
  17. formatter_function_task_test.cc
  18. formatter_issue_regression_test.cc
  19. formatter_macro_test.cc
  20. formatter_module_test.cc
  21. formatter_test.cc
  22. formatter_wrap_style_test.cc
  23. README.md
  24. token-annotator.cc
  25. token-annotator.h
  26. token-annotator_test.cc
  27. tree-unwrapper.cc
  28. tree-unwrapper.h
  29. tree-unwrapper_test.cc
  30. verilog-token.cc
  31. verilog-token.h
  32. verilog-token_test.cc
verible/verilog/formatting/README.md

SystemVerilog Formatting

This directory contains all of the SystemVerilog-specific formatter implementation.

Tool user documentation can be found here.

Formatter Subsystems

Full developer documentation can be found here.

Below is a quick summary of the major components.

formatter.h contains the top-level entry point into the formatter. Text-in-text-out tests are split by concern to reduce merge conflicts:

New GitHub-issue formatter regressions belong in formatter_issue_regression_test.cc only (do not append them to formatter_test.cc).

FormatStyle defines ways in which formatting can be configured.

token_annotator.h marks up a token stream with formatting constraints such as minimum spacing, and always/never-wrap.

TreeUnwrapper converts a SV syntax tree into a language-agnostic TokenPartitionTree representation for doing formatting operations.

align.h implements everything related to tabular alignment of specific sections of code.

comment_controls.h implements comment directives thet disable formatting on ranges of text.