[][src]Crate smpl

Core library to parse, analyze, and compile the SMPL language.

  • This crate does NOT come with the means to execute SMPL code.
    • Use a crate like smpli for a runtime/std instead

Using the Crate

  1. Find your SMPL module code and create an UnparsedModule
  2. Convert your collection of UnparsedModule into a Program by:
    • Preparse using parser::parse_module() and calling Program::from_parsed()
    • Call Program::from_unparsed() directly
  3. Pass off the Program to a code generator (such as in smpl::byte_gen)
    • Code generators will have full access to type information, control flow, metadata, etc.

Modules

byte_gen

Data structures/functions to convert analyzed SMPL code into byte code instructions.

error

Contains smpl's top level error type.

metadata

Contains data structures for metadata collected during static analysis.

module

Contains data structures used to represent SMPL code.

parser
prelude
program

Structs

FnId
ModuleId
TypeId