implement AST validation (#3863)

This commit is contained in:
Alex Lam S.L
2020-05-09 02:58:03 +01:00
committed by GitHub
parent b06fd8a933
commit f74b7f7401
8 changed files with 290 additions and 44 deletions

View File

@@ -147,6 +147,9 @@ var List = (function() {
}
return top.concat(ret);
}
List.is_op = function(val) {
return val === skip || val instanceof AtTop || val instanceof Last || val instanceof Splice;
};
List.at_top = function(val) { return new AtTop(val); };
List.splice = function(val) { return new Splice(val); };
List.last = function(val) { return new Last(val); };