mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[libSyntax] Make RawSyntax a struct
SourcePresence and ID are already shared between the two node kinds and the node's length will soon be cached in RawSyntax as well. By making it a struct, we will be able to compute the node's length when it is being constructed in the initialiser.
This commit is contained in:
@@ -78,10 +78,7 @@ public final class SyntaxTreeDeserializer {
|
||||
}
|
||||
|
||||
private func addToLookupTable(_ node: RawSyntax) {
|
||||
guard let id = node.id else {
|
||||
return
|
||||
}
|
||||
nodeLookupTable[id] = node
|
||||
nodeLookupTable[node.id] = node
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user