Module symbol

Source

Modules§

sym

Macros§

consts 🔒
A helper for symbols defined below. The macro’s job is to bind conveniently usable const items to the symbol names provided. For example, with symbol { a, b } you’d have sym::a and sym::b.
strings 🔒
A helper for symbols defined below. The macro’s job is to merge all the hard-coded strings into a single array of strings. The strategy applied is push-down accumulation.
symbols 🔒
Creates predefined symbols used throughout the Leo compiler and language. Broadly speaking, any hard-coded string in the compiler should be defined here.

Structs§

InnerInterner 🔒
The inner interner. This construction is used to get interior mutability in Interner.
Interner 🔒
A symbol-to-string interner.
SessionGlobals
All the globals for a compiler sessions.
Symbol
An interned string.

Enums§

InternedStr 🔒
An interned string, either prefilled “at compile time” (Static), or created at runtime (Owned).

Constants§

PRE_DEFINED 🔒

Statics§

SESSION_GLOBALS

Functions§

create_session_if_not_set_then
Creates the session globals and then runs the closure f.
with_session_globals
Gives access to read or modify the session globals in f.