Added short type aliases to peon stdlib + minor comment fixes

This commit is contained in:
Mattia Giambirtone 2023-01-24 12:22:26 +01:00
parent bf2be7deac
commit c666c66813
2 changed files with 15 additions and 6 deletions

View File

@ -789,8 +789,7 @@ proc isAny*(typ: Type): bool =
if condition.kind.isAny():
return true
else:
discard
return false
return false
method match*(self: Compiler, name: string, kind: Type, node: ASTNode = nil, allowFwd: bool = true): Name =

View File

@ -12,19 +12,19 @@ type int16* = object {
#pragma[magic: "int16"]
}
type int8* = object {
type int8* = object {
#pragma[magic: "int8"]
}
type uint64* = object {
type uint64* = object {
#pragma[magic: "uint64"]
}
type uint32* = object {
type uint32* = object {
#pragma[magic: "uint32"]
}
type uint16* = object {
type uint16* = object {
#pragma[magic: "uint16"]
}
@ -71,6 +71,16 @@ type auto* = object {
# Some convenience aliases
type int* = int64;
type float* = float64;
type i64* = int64;
type u64* = uint64;
type i32* = int32;
type u32* = uint32;
type i16* = int64;
type u16* = uint64;
type i8* = int32;
type u8* = uint32;
type f64* = float64;
type f32* = float32;
type SignedInteger* = int64 | int32 | int16 | int8;
type UnsignedInteger* = uint64 | uint32 | uint16 | uint8;
type Integer* = SignedInteger | UnsignedInteger;