Skip to main content

crashtest.hxsmith.types

The slice of Haxe's type system the generator reasons about.

class Ty​

A Haxe type: a name and type arguments. Function types are named -> with the parameter types followed by the return type as arguments.

name: str​

args: Tuple['Ty', ...]​

args = ()

is_fn: bool​

params: Tuple['Ty', ...]​

ret: 'Ty'​

of​

def of(name: str) -> bool

init​

def __init__(name: str, args: Tuple['Ty', ...] = ()) -> None

array_of​

def array_of(element: Ty) -> Ty

fn_of​

def fn_of(params: Tuple[Ty, ...], ret: Ty) -> Ty

map_of​

def map_of(key: Ty, value: Ty) -> Ty

null_of​

def null_of(inner: Ty) -> Ty

BOOL​

BOOL = Ty('Bool')

DYNAMIC​

DYNAMIC = Ty('Dynamic')

FLOAT​

FLOAT = Ty('Float')

INT​

INT = Ty('Int')

SCALARS​

SCALARS = (INT, FLOAT, BOOL, STRING)

STRING​

STRING = Ty('String')

VOID​

VOID = Ty('Void')