Skip to content

Commit 7e79dde

Browse files
committed
Add SYNTAX_NODE_MAP
1 parent 950dba9 commit 7e79dde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftSyntaxBuilderGeneration/SyntaxNodes.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ let SYNTAX_NODES: [Node] = COMMON_NODES
1919
+ TYPE_NODES
2020
+ PATTERN_NODES
2121
+ AVAILABILITY_NODES
22+
23+
/// A lookup table of nodes indexed by their kind.
24+
let SYNTAX_NODE_MAP: [String: Node] = Dictionary(
25+
uniqueKeysWithValues: SYNTAX_NODES.map { node in (node.syntaxKind, node) }
26+
)

0 commit comments

Comments
 (0)