[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:
Alex Hoppen
2018-05-24 14:22:49 -07:00
parent f288d7b63a
commit 8c8f4eb1df
6 changed files with 119 additions and 106 deletions

View File

@@ -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
}
}