Entry point of the program, contains only a call to cli() and the modules declaration.
Contains the REPL, the file runner and all things with user interaction.
The error type and the error macro.
Contains the Lexer code and the Token enumeration definition.
The Lexer takes a String and returns a Vec<Token>.
Contains the Parser, a hand made recursive parser, the Literal enumeration definition (an enumeration for describing literal types, such as Integer, Single or String), the Pattern enumeration definition (an enumeration for describing match arms, with Tuple, Constr, Var and Literal variants) and the Expr enumearation definition.
The Parser takes a Vec<Token> and returns a Vec<Expr>.
Contains the Compiler, that takes a Vec<Expr> and returns a Bytecode.
Contains the Bytecode struct, containing the matches, the Chunks, the symbols, the constants, the BytecodePatterns, the OpCodes and the constructors.
matches::Vec<Vec<(u16, Vec<OpCode>)>>: Thematchexpressions, each one being aVec<(u16, Vec<OpCode>)>. Each element of this Vec has a pattern ID (theu16), part of thepatternsfield of theBytecodeand an instruction set, that are theOpCodes being executed when the pattern is matched.Chunks ::Vec<Chunk>: Thechunksof the bytecode, that represent the functions bodies. Each chunk is constitued of a referenceVec<u16>, representing the ID in thesymbolsof theBytecodeof each of the arguments, and of an instruction set,Vec<OpCode>, composing the function body.symbols::Vec<String>: The symbol table of the bytecode, contaning the name of each variable, that is replace by an ID (u16) in the instructions, for size and efficiency reasons.constants::Vec<Literal>: The constants table, containing the constants needed by the program, refered by ID for the same reasons as above.BytecodePatterns ::Vec<BytecodePattern>: The pattern table of the bytecode.BytecodePatternis the same asPatternbut with 2 exceptions: It uses IDs instead of recursive patterns and it has theOtherwisevariant, for the_variable.OpCodes ::Vec<OpCode>: The bytecode instructions.constructors::Vec<u8>: The bytecode constructors, eachu8represents the amount of values contained in the constructor.
The Orion Virtual Machine, containing the Value enumeration declaration and the whole virtual machine.
The maths builtins.
The Orion standard library and prelude.