Rename def to alias.

This commit is contained in:
Christoffer Lerno
2025-03-13 11:22:27 +01:00
parent ae76839347
commit 8b49e6c14d
193 changed files with 790 additions and 776 deletions

View File

@@ -4,8 +4,8 @@
module std::collections::anylist;
import std::io,std::math;
def AnyPredicate = fn bool(any value);
def AnyTest = fn bool(any type, any context);
alias AnyPredicate = fn bool(any value);
alias AnyTest = fn bool(any type, any context);
struct AnyList (Printable)
{

View File

@@ -3,7 +3,7 @@
*>
module std::collections::bitset{SIZE};
def Type = uint;
alias Type = uint;
const BITS = Type.sizeof * 8;
const SZ = (SIZE + BITS - 1) / BITS;
@@ -75,7 +75,7 @@ import std::collections::list;
const BITS = Type.sizeof * 8;
def GrowableBitSetList = List{Type};
alias GrowableBitSetList = List{Type};
struct GrowableBitSet
{

View File

@@ -7,8 +7,8 @@
module std::collections::elastic_array {Type, MAX_SIZE};
import std::io, std::math, std::collections::list_common;
def ElementPredicate = fn bool(Type *type);
def ElementTest = fn bool(Type *type, any context);
alias ElementPredicate = fn bool(Type *type);
alias ElementTest = fn bool(Type *type, any context);
const ELEMENT_IS_EQUATABLE = types::is_equatable_type(Type);
const ELEMENT_IS_POINTER = Type.kindof == POINTER;
macro type_is_overaligned() => Type.alignof > mem::DEFAULT_MEM_ALIGNMENT;

View File

@@ -8,7 +8,7 @@
module std::collections::enumset{Enum};
import std::io;
def EnumSetType = $typefrom(type_for_enum_elements(Enum.elements)) @private;
alias EnumSetType = $typefrom(type_for_enum_elements(Enum.elements)) @private;
const IS_CHAR_ARRAY = Enum.elements > 128;
distinct EnumSet (Printable) = EnumSetType;

View File

@@ -4,8 +4,8 @@
module std::collections::list{Type};
import std::io, std::math, std::collections::list_common;
def ElementPredicate = fn bool(Type *type);
def ElementTest = fn bool(Type *type, any context);
alias ElementPredicate = fn bool(Type *type);
alias ElementTest = fn bool(Type *type, any context);
const ELEMENT_IS_EQUATABLE = types::is_equatable_type(Type);
const ELEMENT_IS_POINTER = Type.kindof == POINTER;

View File

@@ -462,7 +462,7 @@ fn Object* Object.get_or_create_obj(&self, String key)
return container;
}
def ObjectInternalMap = HashMap{String, Object*} @private;
def ObjectInternalList = List{Object*} @private;
def ObjectInternalMapEntry = Entry{String, Object*} @private;
alias ObjectInternalMap = HashMap{String, Object*} @private;
alias ObjectInternalList = List{Object*} @private;
alias ObjectInternalMapEntry = Entry{String, Object*} @private;

View File

@@ -4,7 +4,7 @@
module std::collections::ringbuffer{Type};
import std::io;
def Element = $typeof((Type){}[0]);
alias Element = $typeof((Type){}[0]);
struct RingBuffer (Printable)
{