Mochaccino
Share
Explore

Mochaccino Tools

Compiler
The Mochaccino Cortado compiler takes your source code from words to an abstract syntax tree. It is made up of a scanner and a parser.
Scanner
The scanner takes your source code and produces tokens, which are meaningful chunks of characters. It also attaches metadata such as the line and column number it was found on and token type.
Parser
The parser takes a linear stream of tokens and produces a 2-dimensional tree representation of your code, known as an Abstract Syntax Tree (AST). This is then used by the Affogato code generator to produce Dart code accordingly. But first, the AST must be analysed for errors.
Analyser
Mochaccino’s Espresso Analyser conducts static type-checking and variable binding on the AST produced earlier, modifying certain nodes if needed. This is where compile-time errors are reported.
Codegen
Mochaccino’s Affogato code generator compiles your source code to
source code, making it a source-to-source compiler (aka transpiler). The rest is done by Dart—compiling to bytecode, spinning up a VM, and executing the bytecode instructions in the Dart runtime.
Runtime
Runtime errors thrown by the Dart VM will be reported at this stage.
Barista
Barista is a CLI allows you to run commands for some of the tools mentioned above.
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.