improve readability of --help ast (#3460)

This commit is contained in:
Alex Lam S.L
2019-10-10 04:32:32 +08:00
committed by GitHub
parent a0d4b648bb
commit b18f717b46

View File

@@ -46,7 +46,9 @@ function describe_ast() {
if (ctor.SUBCLASSES.length > 0) {
out.space();
out.with_block(function() {
ctor.SUBCLASSES.forEach(function(ctor, i) {
ctor.SUBCLASSES.sort(function(a, b) {
return a.TYPE < b.TYPE ? -1 : 1;
}).forEach(function(ctor, i) {
out.indent();
doitem(ctor);
out.newline();