module Cosmo::TypeChecker
Extended Modules
Defined in:
cosmo/runtime/type_checker.crConstant Summary
-
ALIASES =
{} of String => String
-
REGISTERED =
[] of Type
-
TYPE_MAP =
{Int128 => "bigint", Int64 => "int", Int32 => "int", Int16 => "int", Int8 => "int", UInt64 => "uint", UInt32 => "uint", UInt32 => "uint", UInt16 => "uint", UInt8 => "uint", Float64 => "float", Float32 => "float", String => "string", Char => "char", Bool => "bool", Nil => "none", ClassInstance => "classinstance", Class => "class", Type => "type", Function => "Function", Intrinsic::IFunction => "intrinsic_fn", RangeType => "Range", Spread => "Spread"}
Instance Method Summary
- #alias_type(alias_name : String, original : String) : Type
- #array_as_value_type(arr : Array(T)) : Array(ValueType) forall T
- #as_value_type(value : T) : ValueType forall T
- #assert(typedef : String, value : ValueType, token : Token) : Nil
- #cast(value : ValueType, type : Token) : ValueType
-
#cast?(value : T, type : Token) : ValueType forall T
array types
- #get_mapped(t : CrystalClass) : String
- #get_registered_type(name : String, token : Token) : Type | Nil
- #get_registered_type?(typedef : String, token : Token) : Type | Nil
- #hash_as_value_type(hash : Hash(K, V)) : Hash(ValueType, ValueType) forall K, V
- #is?(typedef : String, value : ValueType, token : Token, except = false) : Bool
- #register_intrinsics
- #register_type(name : String) : Type
- #reset