Enum piske::symbol::Symbol [] [src]

pub enum Symbol {
    BuiltinType {
        name: Identifier,
        ty: PType,
    },
    Variable {
        name: Identifier,
        ty: Option<PType>,
    },
    Function {
        name: Identifier,
        ret_ty: Option<PType>,
        body: FunctionBody,
        params: Vec<Node<Parameter>>,
    },
}

Symbol object (for use in symbol tables).

Variants

Built-in types

Fields of BuiltinType

Name of the built-in type (a keyword)

PType associated with the name

Variables

Fields of Variable

Name of the variable

Type of this variable (an Option, since this type is not known at all times of the computation)

Functions

Fields of Function

Name of the function

Return type of the function (an Option since this type is not known at all times of the computation)

Function Body

Function parameters,

Methods

impl Symbol
[src]

[src]

Create a builtin type Symbol, with specified type

[src]

Create a function Symbol, with specified type

[src]

Create a function Symbol, with specified type

[src]

Create a variable Symbol

[src]

Return true if symbol is a standard library function

Trait Implementations

impl Clone for Symbol
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Symbol
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Symbol
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Display for Symbol
[src]

[src]

Formats the value using the given formatter. Read more