module Cosmo::TypeChecker
Extended Modules
Defined in:
cosmo/runtime/typechecker.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", Float64 => "float", Float32 => "float", String => "string", Char => "char", Bool => "bool", Nil => "none", ClassInstance => "classinstance", Class => "class", Type => "type", Function => "func", Array(Int64) => "int[]", Array(Int32) => "int[]", Array(Int16) => "int[]", Array(Int8) => "int[]", Array(Float64) => "float[]", Array(Float32) => "float[]", Array(String) => "string[]", Array(Char) => "char[]", Array(Bool) => "bool[]", Array(Function) => "fn[]", Array(ValueType) => "any[]", Array => "any[]", Hash(ValueType, ValueType) => "Table", Range(Int128 | Int16 | Int32 | Int64 | Int8, Int128 | Int16 | Int32 | Int64 | Int8) => "Range"}
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 : ValueType, type : Token) : ValueType
- #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