Crate clue_core

source ·
Expand description

§The Clue compiler core

This is the core of the Clue compiler This is used by the cli but can also be used by other projects It is recommended to use Clue instead of the lower level APIs unless you need to

Modules§

  • This module contains the Code data structure and its iterators.
  • The compiler is the last step of the compilation process which translates an AST to Lua code.
  • The env module contains miscellaneous structs and enums related to the compiler options available
  • The parser is the third step of the compilation process. It takes the tokens from the scanner and converts them into an AST (Abstract Syntax Tree).
  • The preprocessor is the first step in the compilation process. It is responsible for removing comments and expanding macros and directives.
  • The scanner is the second step of the compilation process, it takes the preprocessed source code and turns it into a list of tokens

Macros§

  • Check whether tocheck is Ok or Err If it’s Ok it returns it If it’s Err it converts the error to a String and propagates it to the caller function
  • Format strings, used mainly inside the Clue code base This is used to format strings in a way that is more efficient than using format!

Structs§

  • The main Clue library API This is the API that you will use to interact with Clue for most use cases It’s recommended to use this API instead of the lower level APIs unless you need to