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
/// When the path leads outside the Trie, the Trie is not extended and no node is marked as a potential prefix.
196
195
/// This is just a performance optimisation - all the files are linked to already existing nodes, so there is no need to create and visit deeper nodes.
197
196
/// </remarks>
198
-
let recwalkDownAndMark(id :LongIdent)(node :TrieNode)=
197
+
let recwalkDownAndMark(id :SimpleId)(node :TrieNode)=
199
198
match id with
200
199
// Reached end of the identifier - new reachable node
201
-
|[]->
200
+
|[||]->
202
201
markPotentialPrefix node
203
202
// More segments exist
204
-
|segment :: rest->
203
+
|id->
205
204
// Visit (not 'reach') the TrieNode
206
205
markReachable node
207
-
match node.Children.TryGetValue(segment.idText)with
206
+
match node.Children.TryGetValue id[0]with
208
207
// A child for the segment exists - continue there
209
208
|true, child ->
210
-
walkDownAndMark rest child
209
+
walkDownAndMark id[1..] child
211
210
// A child for the segment doesn't exist - stop, since we don't care about the non-existent part of the Trie
212
211
|false,_->
213
212
()
214
213
215
-
letprocessRef(id :LongIdent)=
214
+
letprocessRef(id :SimpleId)=
216
215
// Start at every potential prefix,
217
216
List<_>(potentialPrefixes)// Copy the list for iteration as the original is going to be extended.
0 commit comments