Skip to content

Commit 2908ab9

Browse files
joshtriplettehuss
authored andcommitted
Add cfg(true) and cfg(false) to conditional compilation (RFC 3695)
1 parent f313a01 commit 2908ab9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/conditional-compilation.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ ConfigurationPredicate ->
88
| ConfigurationAll
99
| ConfigurationAny
1010
| ConfigurationNot
11+
| `true`
12+
| `false`
1113
1214
ConfigurationOption ->
1315
IDENTIFIER ( `=` ( STRING_LITERAL | RAW_STRING_LITERAL ) )?
@@ -50,6 +52,9 @@ r[cfg.predicate.any]
5052
r[cfg.predicate.not]
5153
* `not()` with a configuration predicate. It is true if its predicate is false and false if its predicate is true.
5254

55+
r[cfg.predicate.literal]
56+
* `true` or `false` literals, which are always true or false respectively.
57+
5358
r[cfg.option-spec]
5459
_Configuration options_ are either names or key-value pairs, and are either set or unset.
5560

0 commit comments

Comments
 (0)