This patch mainly handles treating begin as block openers.
While and for statements will be handled in another patch.
Paths
| Differential D123450
[clang-format] Parse Verilog if statements ClosedPublic Authored by sstwcw on Apr 9 2022, 3:47 AM.
Details Summary This patch mainly handles treating begin as block openers. While and for statements will be handled in another patch.
Diff Detail
Event Timelinesstwcw added a parent revision: D121757: [clang-format] Take out common code for parsing blocks NFC.Apr 9 2022, 3:49 AM
sstwcw added inline comments.
Comment Actions As first passes for adding a new language I think this looks pretty good. `if (Keywords.isBlockBegin(*FormatTok, Style)) {` I'm not a massive fan of handling l_brace and begin and end as the same thing, I might be tempted to handle them separately, as then its clear what is happening, but I don't think I'd block it for that. sstwcw removed a parent revision: D121757: [clang-format] Take out common code for parsing blocks NFC.May 1 2022, 2:02 AM sstwcw added a child revision: D124749: [clang-format] Handle Verilog preprocessor directives.May 1 2022, 8:15 PM This revision is now accepted and ready to land.Jun 13 2022, 3:42 AM This revision was landed with ongoing or failed builds.Jun 25 2022, 7:21 PM Closed by commit rG9ed2e68c9ae5: [clang-format] Parse Verilog if statements (authored by sstwcw). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions clang/docs/ClangFormatStyleOptions.rst was out of sync because dump_format_style.py had not been run. Fixed in cc55d97.
Comment Actions
+1
Revision Contents
Diff 435771 clang/docs/ClangFormat.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/FormatToken.h
clang/lib/Format/UnwrappedLineParser.cpp
clang/tools/clang-format/ClangFormat.cpp
clang/unittests/Format/CMakeLists.txt
clang/unittests/Format/FormatTestUtils.h
clang/unittests/Format/FormatTestVerilog.cpp
|
Can't we do that with a type?
I'm not very happy about the alias, because you can still call Tok.getKind().