class

DoisC::Environment::Global

Inherits Reference < Object

Global semantic environment for predeclared types, builtin symbols, and user-defined top-level type/function/procedure declarations.

Constructors

Instance methods

builtin?(name : String) : Bool

Returns true if the given name belongs to the compiler-provided prelude.

Source
builtins
Source
define_function(name : String, defn : Types::FunctionDefinition)
Source
define_procedure(name : String, defn : Types::FunctionDefinition)

Procedures are currently stored in the same global function table. Their semantic distinction is preserved elsewhere in the compiler.

Source
define_type(ref : Types::NominalTypeReference, defn : Types::TypeDefinition)
Source
func_defs
Source
function_definition(name : String)
Source
get_or_create_type_ref(name : String)
Source
register_type(name : String)

Register a user-defined nominal type name before its full definition is resolved. This is distinct from builtin/prelude type registration.

Source
type_definition(ref : Types::NominalTypeReference)
Source
type_reference(name : String) : Types::TypeReference | Nil
Source