fix some extends up
This commit is contained in:
parent
84320e5aab
commit
ead6aa7066
5
index.js
5
index.js
|
@ -114,7 +114,7 @@ function parse(code) {
|
||||||
code = removeComments(code);
|
code = removeComments(code);
|
||||||
|
|
||||||
let match;
|
let match;
|
||||||
const elements = [];
|
let elements = [];
|
||||||
|
|
||||||
// look for interfaces
|
// look for interfaces
|
||||||
let interfaceFreeCode = code;
|
let interfaceFreeCode = code;
|
||||||
|
@ -170,6 +170,8 @@ function parse(code) {
|
||||||
}
|
}
|
||||||
code = constFreeCode;
|
code = constFreeCode;
|
||||||
|
|
||||||
|
elements = elements.sort((a, b) => b[1].extends ? 1 : 0 - a[1].extends ? 1 : 0).reverse(); // for extending bullshit
|
||||||
|
|
||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +180,6 @@ async function recursiveReaddir(rpath, p, fileNames) {
|
||||||
fileNames = (fileNames || []).slice();
|
fileNames = (fileNames || []).slice();
|
||||||
const files = await fs.readdir(rpath);
|
const files = await fs.readdir(rpath);
|
||||||
for (const f of files) {
|
for (const f of files) {
|
||||||
console.log(f);
|
|
||||||
const stat = await fs.lstat(path.join(rpath, f));
|
const stat = await fs.lstat(path.join(rpath, f));
|
||||||
if (stat.isDirectory() || stat.isSymbolicLink()) {
|
if (stat.isDirectory() || stat.isSymbolicLink()) {
|
||||||
fileNames.push(...await recursiveReaddir(path.join(rpath, f), p + f + '/', fileNames));
|
fileNames.push(...await recursiveReaddir(path.join(rpath, f), p + f + '/', fileNames));
|
||||||
|
|
Loading…
Reference in New Issue