Quail-Language

Quail Specification

Back to index

Chapter 13: Documentation

13.1 Definitions

TOC stands for Table of Contents. It lists all documentation entries

13.2 Documentation syntax

13.2.1 TOC Entry

Syntax: #?toc-entry <entryName>

Generates a TOC entry with provided name that links to HTML #<entryName> id

Example: #?toc-entry MyClass

13.2.2 Author

Syntax: #?author <author>

Adds author description. Multiple authors allowed

Example: #?author Tapeline

13.2.3 Badge

Syntax: #?badge <badge-title> or #?badge-<badge-color> <badge-title>

Adds a badge with chosen color.

Available colors:

If color is not provided, it defaults.

Examples:

#?badge For testing purposes
#?badge-yellow Deprecated

13.2.4 HTML

Syntax: #?html <html>

Adds raw html

Example: #?html <h1>Overview</h1>

13.2.5 Since

Syntax: #?since <since>

Add since badge. Only one per context allowed.

Example: #?since 0.1-alpha.2

13.2.6 DocString

Syntax #? <text>

Adds a textual description

Example: #? Checks if given key is present

13.2.7 See

Syntax: #?see <link>

Add a link. If link starts with > and special flag -sF.seeLinkPrefix is set, it will be prepended.

Also, if link starts with >, .q sequences will be dropped.

Examples:

13.3 Classes and functions representation

Classes and functions are automatically documented.

Each class and function documentation entry is labeled with HTML id=.

Example:

class A {}         # Will be id=#A
class B {          # Will be id=#B
  function c() {}  # Will be id=#A::c
}
function d() {}    # Will be id=#d

13.3 Generating documentation

You can generate documentation using gendoc mode:

java -jar quail.jar gendoc fileToDocument.q > outputFile.html

Additional flags for mode available: