Implement path alias unpacking

This commit is contained in:
Zaid Abdulla committed 2016-07-20 03:29:19 +03:00
1 parent 788bd98c8c
commit 1537603945
7 files changed
+691 -541

No files matched your search

+5 -4
View File
@@ -79,18 +79,19 @@ class PathSet {
}
}
var wildcards = 0;
var wildcard = 0;
this.lengthIndex[path.length].add(path);
for (let i = 0; i < path.length; ++ i) {
let fragment = path[i];
if (fragment === '*')
wildcards |= 1 << i;
wildcard |= 1 << i;
this.fragmentIndex[i][fragment].add(path);
}
if (path.wildcards == null) {
path.wildcards = wildcards;
if (path.wildcard == null) {
path.alias = 0;
path.wildcard = wildcard;
Object.freeze(path);
}
return path;