eĿlipsis
a language independent preprocessor
Loading...
Searching...
No Matches
ellipsis-predefined.h
Go to the documentation of this file.
1
# once ELLIPSIS_PREDEFINED_H
2
8
# define __BRACE_LEVEL__ 0
9
# define __BRACKET_LEVEL__ 0
10
# define __ATTR_LEVEL__ 0
11
12
# ifndef DOXYGEN_SPECIAL
13
# define __has_c_attribute __has_c_attribute
14
# define __building_module(…) 0
15
# define __IGNORE__(…) __IGNORE(__VA_ARGS__)
16
# define __IGNORE(…)
17
/* instrument braces */
18
# define { \u007b
19
# define } \u007d
20
# bind __BRACE_INC __IGNORE__(__INCREMENT__(__BRACE_LEVEL__))
21
# bind __BRACE_DEC __IGNORE__(__DECREMENT__(__BRACE_LEVEL__))
22
# gather { __BRACE_INC
23
# gather __BRACE_DEC }
24
# gather } __BRACE_DEC
25
/* instrument brackets */
26
# define [ \u005b
27
# define ] \u005d
28
# bind __BRACKET_INC __IGNORE__(__INCREMENT__(__BRACKET_LEVEL__))
29
# bind __BRACKET_DEC __IGNORE__(__DECREMENT__(__BRACKET_LEVEL__))
30
# gather [ __BRACKET_INC
31
# gather __BRACKET_DEC ]
32
# gather ] __BRACKET_DEC
33
# define = \u003d
34
# define ; \u003b
35
/* instrument attribute: this is special because of its interaction
36
with brackets. In fact ]] may end an attribute or be ending two
37
subscripts as in a[b[9]]. */
38
# define [[ \u005b\u005b
39
# define ]] \u005d\u005d
40
# bind __ATTR_START __IGNORE__(__INCREMENT__(__ATTR_LEVEL__)__INCREMENT__(__BRACKET_LEVEL__)__INCREMENT__(__BRACKET_LEVEL__))
41
# bind __ATTR_END __IGNORE__(__DECREMENT__(__BRACKET_LEVEL__)__DECREMENT__(__BRACKET_LEVEL__)__ATTR_END_(__BRACKET_LEVEL__, __ATTR_LEVEL__))
42
# define __ATTR_END_(B, A) __MULTI__(__ATTR, END, B, A)
43
/* Only do something if all [] are closed and there had been an opening [[ */
44
# define __ATTR_END_0_1 __DECREMENT__(__ATTR_LEVEL__)
45
# gather [[ __ATTR_START
46
# gather __ATTR_END ]]
47
# gather ]] __ATTR_END
48
# define ⟦ [[
49
# define ⟧ ]]
50
/* Instrument ::. This has two different meanings according to context. */
51
# define __ATTR_DCOLON_0 ,
52
# define __DCOLON__ __ATTR_DCOLON__(__ATTR_LEVEL__)
53
# define __ATTR_DCOLON__(C) __ATTR_DCOLON_(__MULTI__(⸤__ATTR_DCOLON⸥, C)0)
54
# define __ATTR_DCOLON_(…) __ATTR_DCOLON(__VA_ARGS__)
55
# define __ATTR_DCOLON(X,…) __ATTR_DCOLON_I ## __VA_OPT__(plus)
56
/* general context: name composition */
57
# define __ATTR_DCOLON_Iplus ∷
58
/* attribute context: separate prefix and suffix */
59
# define __ATTR_DCOLON_I \u003a\u003a
60
# define :: __DCOLON__
61
# endif
62
include
c
ellipsis-predefined.h
Generated by
1.9.8
eĿlipsis
20250219
© 2025 Jens Gustedt
eĿlipsis
20250219