diff --git a/lib/ast.js b/lib/ast.js index 2843bbb9..90acefc3 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -113,6 +113,7 @@ Cola.AST_Node = Cola.DEFNODE("Node", "start end", { }, null); Cola.AST_Command = Cola.DEFNODE("Command", "name args", { + $iscola: true, $documentation: "Compiler-command statement", $propdoc: { name: "[string] Name of command", @@ -401,6 +402,7 @@ Cola.AST_Defun = Cola.DEFNODE("Defun", "type", { }, Cola.AST_Lambda); Cola.AST_Namedarg = Cola.DEFNODE("Namedarg", "start end name value", { + $iscola: true, $documentation: "Named argument", $propdoc: { value: "Value of named argument" @@ -408,6 +410,7 @@ Cola.AST_Namedarg = Cola.DEFNODE("Namedarg", "start end name value", { }, Cola.AST_SymbolRef); Cola.AST_ArgDef = Cola.DEFNODE("ArgDef", "start end name type argtype defval", { + $iscola: true, $documentation: "A function argument expression", $propdoc: { type: "Data type", @@ -515,6 +518,7 @@ Cola.AST_Case = Cola.DEFNODE("Case", "expression", { }, Cola.AST_SwitchBranch); Cola.AST_When = Cola.DEFNODE("When", null, { + $iscola: true, $documentation: "A `when` switch branch" }, Cola.AST_Case); @@ -689,6 +693,7 @@ Cola.AST_Dot = Cola.DEFNODE("Dot", null, { }, Cola.AST_PropAccess); Cola.AST_Proto = Cola.DEFNODE("Proto", null, { + $iscola: true, $documentation: "Accessor to prototype", _walk: function(visitor) { return visitor._visit(this, function(){ @@ -698,6 +703,7 @@ Cola.AST_Proto = Cola.DEFNODE("Proto", null, { }, Cola.AST_PropAccess); Cola.AST_Cascade = Cola.DEFNODE("Cascade", "expression subexpressions", { + $iscola: true, $documentation: "Base class for properties access expressions, i.e. `a..foo..bar`", $propdoc: { expression: "[AST_Node] the “container” expression", @@ -796,10 +802,12 @@ Cola.AST_Array = Cola.DEFNODE("Array", "elements template vardef", { }); Cola.AST_ArrayTemplate = Cola.DEFNODE("ArrayTemplate", null, { + $iscola: true, $documentation: "Array assignment template.", }, Cola.AST_Array); Cola.AST_ArrayRange = Cola.DEFNODE("ArrayRange", "from to triple", { + $iscola: true, $documentation: "An array range.", $propdoc: { from: "[AST_Node] range from", @@ -828,6 +836,7 @@ Cola.AST_Object = Cola.DEFNODE("Object", "properties template vardef", { }); Cola.AST_ObjectTemplate = Cola.DEFNODE("ObjectTemplate", null, { + $iscola: true, $documentation: "Object assignment template.", }, Cola.AST_Object); @@ -938,6 +947,7 @@ Cola.AST_String = Cola.DEFNODE("String", "value", { }, Cola.AST_Constant); Cola.AST_StringTemplate = Cola.DEFNODE("StringTemplate", "body", { + $iscola: true, $documentation: "A string template", $propdoc: { body: "[AST_Statement*] the contents of this string template"