Crate solar_interface

Source
Expand description

§solar-interface

Source positions, diagnostics, and related helper functions.

Important concepts in this module include:

  • the span, represented by Span and related types;
  • source code as represented by a SourceMap; and
  • interned strings, represented by Symbols, with some common symbols available statically in the sym module.

Re-exports§

pub use source_map::SourceMap;
pub use solar_config as config;
pub use solar_data_structures as data_structures;

Modules§

diagnostics
Diagnostics implementation.
kw
This module contains all the defined keyword Symbols.
panic_hook
Functions for installing a custom panic hook.
source_map
SourceMap related types and operations.
sym
This module contains all the defined non-keyword Symbols.

Macros§

error_code
Used for creating an error code. The input must be exactly 4 decimal digits.
pluralize
Pluralize a word based on a count.

Structs§

BytePos
A byte offset relative to the global source map.
CharPos
A character offset.
Ident
An identifier.
RelativeBytePos
A byte offset relative to file beginning.
Session
Information about the current compiler session.
SessionBuilder
Builder for Session.
SessionGlobals
Per-session global variables.
Span
A source code location.
Symbol
An interned string.

Enums§

ColorChoice
Selection for overriding color output

Constants§

VERSION
The current version of the Solar compiler.

Functions§

canonicalize
Like std::fs::canonicalize(), but on Windows it outputs the most compatible form of a path instead of UNC.
enter
Creates new session globals on the current thread if they doesn’t exist already and then executes the given closure.

Type Aliases§

Result
Compiler result type.