Next: , Previous: Method calls and dereferencing, Up: Syntax


3.1.5 Documentation strings

Kite has built-in support for documentation strings.

3.1.5.1 How to write

Documentation strings begin with /[ and end with /]. The string can span multiple lines. Example:

     /[Top of file]/
     
     class Test /[A class.]/ [
         property prop /[A property.]/,
     
         construct() /[A constructor.]/ [
             ...
         ],
     
         destruct() /[A destructor.]/ [
             ...
         ],
     
         operator plus(rhs)
         [
             ...
         ],
     
         method x(
             arg /[A method argument.]/
         ) /[A method.]/
         [
             ...
         ]
     ];
3.1.5.2 Generating documentation

To generate documentation, use System.doc|generate_doc():

     import "System.doc";
     import "your.package";
     
     out = make System.doc.outputters.html_outputter();
     doc = System.doc|generate_doc(your.package);
     doc|output(out);

An example of kdoc documentation (generated from System.doc) can be found at http://www.kite-language.org/kdoc-test/System.doc.html.

3.1.5.3 Supported constructs

The following constructs can have documentation strings: