UNPKG

documon

Version:

A documentation system for mortals. Use with any language.

7 lines 2.56 kB
[ { "start": 126, "end": 191, "data": "\nFills the output object with the following properties (if they exist)\n\n\t\tobject {\n\t\t\tsource \t\t// Entire first line inlcuding the @flag (only first line)\n\t\t\tafter\t\t// Everything after the @flag\n\t\t\tname\t\t// One word following {type}. Or first word after the @flag definition when no {type}.\n\t\t\tchildren\t// name.kid - Array of children\n\t\t\tparent\t\t// if am a child, this is my parent.\n\t\t\tflag\t\t// @flag token with @ stripped\n\t\t\tdefaultVal\t// name=val\n\t\t\tafterType\t// first line after\n\t\t\ttext\t\t// \n\t\t}\n\nHere's an expanded and exmple'd definition list\n\nsource\n: The entire comment block\n\nafter\n: Everything after the @flag token \"as is\" (kinda like source)\n\n- __source__ : The entire comment block\n- __after__ : \t\tEverything after the @flag token \"as is\" (kinda like source)\n\n\te.g. in this line:\n\t\t\t@foo {type} name descr\n\t\t after yields:\n\t\t \t{type} name descr\n\n- __name__ : \t\tThe first word following the {type} definition. Or the first word after the @flag definition\n\n- __children__ : \tIf a name is written as foo.bar then foo is the parent and bar is a child. Future processing fills the array forming a heirarchy.\n- __parent__ : \t\tThe parent flag of a child. This property only exists on children flags.\n- __defaultVal__ : \tWhen name=foo then default value will be foo. Note that quotes are stripped.\n\t\t\t\te.g. foo=\"bar\" sets default property to \"bar\" (without the quotes) and name property to \"foo\".\n- __flag__ : \t\tThe flag kind - the @ is stripped\n- __afterType__ : \tEverything after the {type} definition\n\t\t\t\te.g. @flag {type} name - descr\n\t\t\t\t\t... yields:\n\t\t\t\t\tname - descr\n- __text__ : \t\tThe description for the paramter. Note that additional description text can be provided below the @flag.\n\t\t\t\t\te.g. @flag {type} name - description\n\t\t\t\t\tmore description\n\t\t\t\t\tbelow the flag here\n\n\n\n\t\t@flag {kind} name.child=defaultVal - description \\n stuff on next line \\n and other next lines...\n\t\t|flag|\n\t\t |defaultVal|\n\t\t |child|\n\t\t |parent|\n\t\t |name|\n\t\t |text ------------------------------------------------------|\n\t\t |afterType ---------------------------|\n\t\t |after -------------------------------------|\n\t\t|source ------------------------------------------|\n\n\n\n@class parseFlags\n@package documon" } ]