Skip to content

Commit

Permalink
Add a note about formatting macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadden committed Sep 18, 2020
1 parent 7534275 commit 20a20ae
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/flow-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ is a simple example that makes use of all three:
?> The alia control flow macros come in both uppercase and lowercase forms.
Traditionally, they have been lowercase to more closely resemble the actual
C++ keywords that they mimic. However, the uppercase form makes it more
obvious to readers (and clang-format) that the macros are indeed macros.
Ultimately, it's up to you which style you prefer. If you want to be strict
in your project, you can disable the lowercase form in [the
configuration](configuration.md).
obvious to readers that the macros are indeed macros. Ultimately, it's up to
you which style you prefer. If you want to be strict in your project, you
can disable the lowercase form in [the configuration](configuration.md).

[source](numerical.cpp ':include :fragment=analysis')

Expand All @@ -62,6 +61,16 @@ before `n` is given a value, none of the `dom::text` calls are executed.
As with all alia control flow macros, `alia_if` blocks must be terminated with
`alia_end`.

?> If you use ClangFormat, the following options are recommended to help it
understand alia's macros:<br><br>
<code style="display: block; white-space: pre-line;">StatementMacros:
- ALIA_END
- ALIA_CASE
- ALIA_DEFAULT
- alia_end
- alia_case
- alia_default</code>

### Context Naming

All alia control flow macros need access to the alia *context*, so they assume
Expand Down

0 comments on commit 20a20ae

Please sign in to comment.