[][src]Module outline::parser::bird

The parser for Bird Style literate programming.

This includes some extensions to support some of the more advanced features of this tool.

See examples/bird/wc.c.lit for an example of how to use this format with the default config, which is specified as follows:

  • Code lines begin with > , and must be preceded and followed by a blank line.
  • A macro (named code block) starts with >>> Name of the code block as its first line.
  • The comment symbol is //.
  • Interpolation of is done such as @{a meta variable}.
  • Macros (named code blocks) are invoked by ==> Macro name. (note the period at the end)

As with all supported styles, all code blocks with the same name are concatenated, in the order they are found, and the "unnamed" block is used as the entry point when generating the output source file. Any code blocks with names which are not invoked will not appear in the compiled code.

Currently, the Bird Style does not support code that is written to the compiled file, but not rendered in the documentation file.

Structs

BirdParser

The config for parsing a Bird Style document

Enums

BirdError

Errors that were encountered while parsing the document

BirdErrorKind

Kinds of errors that can be encountered while parsing and restructuring the document