Skip to content

Commit 923c43d

Browse files
author
Daniel Kroening
authored
Merge pull request #842 from reuk/irep-ids-doc
Add documentation to irep_ids
2 parents 9e42f4f + bfeea76 commit 923c43d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/util/irep_ids.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/// \file List of irep id names and values.
2+
/// For an explanation of how this works, see irep_ids.h.
3+
14
IREP_ID_TWO(empty_string, )
25
IREP_ID_ONE(let)
36
IREP_ID_ONE(nil)

src/util/irep_ids.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ Author: Reuben Thomas, [email protected]
1515
#include "dstring.h"
1616
#endif
1717

18+
/// \file The irep_ids are generated using a technique called
19+
/// [X-macros](https://en.wikipedia.org/wiki/X_Macro).
20+
/// The ids are defined in the file irep_ids.def, using a pair of macros
21+
/// `IREP_ID_ONE` and `IREP_ID_TWO`.
22+
/// Definitions of the form `IREP_ID_ONE(param)` will be converted into a
23+
/// const extern irep_idt with the variable name `ID_param` and the string
24+
/// value `"param"`.
25+
/// Definitions of the form `IREP_ID_TWO(param, contents)` will be converted
26+
/// into a const extern irep_idt with the variable name `ID_param` and the
27+
/// string value `"contents"`.
28+
1829
enum class idt:unsigned
1930
{
2031
#define IREP_ID_ONE(the_id) id_##the_id,

0 commit comments

Comments
 (0)