You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/SwiftIfConfig/SwiftIfConfig.docc/SwiftIfConfig.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,10 @@ The syntax tree and its parser do not reason about the build configuration. Rath
27
27
The `SwiftIfConfig` library provides utilities to determine which syntax nodes are part of a particular build configuration. Each utility requires that one provide a specific build configuration (i.e., an instance of a type that conforms to the <doc:BuildConfiguration> protocol), and provides a different view on essentially the same information:
28
28
29
29
*<doc:ActiveSyntaxVisitor> and <doc:ActiveSyntaxAnyVisitor> are visitor types that only visit the syntax nodes that are included ("active") for a given build configuration, implicitly skipping any nodes within inactive `#if` clauses.
30
-
*``SyntaxProtocol/removingInactive(in:)`` produces a syntax node that removes all inactive regions (and their corresponding `IfConfigDeclSyntax` nodes) from the given syntax tree, returning a new tree that is free of `#if` conditions.
31
-
*``IfConfigDeclSyntax.activeClause(in:)`` determines which of the clauses of an `#if` is active for the given build configuration, returning the active clause.
32
-
*``SyntaxProtocol.isActive(in:)`` determines whether the given syntax node is active for the given build configuration. The result is one of "active"
30
+
*`SyntaxProtocol/removingInactive(in:)` produces a syntax node that removes all inactive regions (and their corresponding `IfConfigDeclSyntax` nodes) from the given syntax tree, returning a new tree that is free of `#if` conditions.
31
+
*`IfConfigDeclSyntax.activeClause(in:)` determines which of the clauses of an `#if` is active for the given build configuration, returning the active clause.
32
+
*`SyntaxProtocol.isActive(in:)` determines whether the given syntax node is active for the given build configuration. The result is one of "active"
33
33
(the node is included in the program), "inactive" (the node is not included
34
34
in the program), or "unparsed" (the node is not included in the program and
35
35
is also allowed to have syntax errors).
36
-
*``SyntaxProtocol.configuredRegions(in:)`` produces an array describing the various regions in which a configuration has an effect, indicating active, inactive, and unparsed regions in the source tree. The array can be used as an input to `SyntaxProtocol.isActive(inConfiguredRegions:)`` to determine whether a given syntax node is active.
36
+
*`SyntaxProtocol.configuredRegions(in:)` produces an array describing the various regions in which a configuration has an effect, indicating active, inactive, and unparsed regions in the source tree. The array can be used as an input to `SyntaxProtocol.isActive(inConfiguredRegions:)` to determine whether a given syntax node is active.
0 commit comments