Skip to main content

Module parser

Module parser 

Source
Expand description

Parser for Treble Live DSL.

The parser is line-oriented: each source line is parsed independently. def blocks are the sole exception — parse_program gathers a block’s lines and parses them as a unit. Mini-notation (inside double quotes) is parsed with nom combinators.

Structs§

Statement
One statement and where its text came from.

Functions§

parse_instrument_def
Parse a complete def block, braces included.
parse_line
Parse a single source line into a SourceLine.
parse_mini
Parse a mini-notation string into a MiniNotation.
parse_program
Parse an entire source string into a Program.
statements
Split a buffer into statements, in order. Blank and comment-only lines are statements of their own, kept verbatim, as are the lines of def blocks.