add documentation

This commit is contained in:
alexlamsl 2017-02-02 01:52:05 +08:00
parent 73a9aa0c06
commit 5088aeedac

View File

@ -585,10 +585,11 @@ var AST_New = DEFNODE("New", null, {
var AST_Seq = DEFNODE("Seq", "car cdr", { var AST_Seq = DEFNODE("Seq", "car cdr", {
$documentation: "A sequence expression (two comma-separated expressions)", $documentation: "A sequence expression (two comma-separated expressions)",
$propdoc: { $propdoc: {
car: "[AST_Node] first element in sequence", car: "[AST_Node] first element in sequence (should not be instanceof AST_Seq or null)",
cdr: "[AST_Node] second element in sequence" cdr: "[AST_Node] second element in sequence (should not be null)"
}, },
$cons: function(x, y) { $cons: function(x, y) {
// TODO: Remove these sanity checks at the end of PR
if (!x) { if (!x) {
throw new Error('AST_Seq.car missing'); throw new Error('AST_Seq.car missing');
} }