Lyricdev
GitHub

enum Type

pub enum Type :: [Debug]

Conforms to Debug.

A written type, each form a variant: a name with its arguments (and the names of the arguments that bind an associated type, "" where positional, none when none is named; then the module a quote wrote the name in, or null), ?T, T[] and T[N], a tuple with its labels ("" where none), a function type with its thrown set and which parameters take a place, a throwing type.

Variants

Named(string[], Type[], string[], ?string, Span)
Optional(Box<Type>, Span)
Array(Box<Type>, ?int, Span)
Tuple(Type[], string[], Span)
Fn(Type[], Box<Type>, ?Type[], bool[], Span)
Throwing(Box<Type>, ?Box<Type>, Span)

Methods

pub fn span(): Span

Returns where this type stands.

pub fn toSource(): string
pub fn children(): Node[]

Returns the nodes directly inside this one, in source order.