Crate debris_common
source ·Expand description
Common items used by the compiler
Modules
- accessor 🔒
- config 🔒
- This module has the
FileProvider
trait, which is used by the compile config to resolve import statements. - Very basic graph implementation which is specialized for
llir
block analysis - ident 🔒
- Input files are used to store the files required for successful compilation The big advantage of have a global storage of all possible input files is that this allows for extremely cheap spans which only consist of a (start, length) tuple. To get the corresponding file for a span, simply check whether the span lies withing file.offset and file.offset + file.length
- span 🔒
Structs
- A code object contains the source code and optionally a path to the corresponding file
- A handy object to work in a specific input file
- The id of the current compilation unit. Used to generate ids that are unique across all compilation units
- The Compilation context stores various information about the current compilation
- Holds data about the user specified configuration
- A single input file, implementation detail
- Keeps track of all input files and allows to make cheap copy-able spans
- A span which uniquely specifies a span of characters in their corresponding file All spans are dependent on the
InputFiles
which contains the file that spans can refer to.
Enums
- An accessor represents a dotted path
- The build mode for this compilation
- identifier for a value
- How to optimize the code
- Every special identifier
Functions
- Utility function to get the width of a character at a given byte index
Type Aliases
- The type of a code id, currently just a usize