[−][src]Enum piske::symbol::Symbol
Symbol object (for use in symbol tables).
Variants
BuiltinType
Built-in types
Fields of BuiltinType
Variable
Variables
Fields of Variable
name: Identifier
Name of the variable
ty: Option<PType>
Type of this variable (an Option, since this type is not known at all times of the computation)
Function
Functions
Fields of Function
name: Identifier
Name of the function
ret_ty: Option<PType>
Return type of the function (an Option since this type is not known at all times of the computation)
body: FunctionBody
Function Body
params: Vec<Node<Parameter>>
Function parameters,
Methods
impl Symbol
[src]
pub fn builtin(name: Identifier, ty: PType) -> Symbol
[src]
Create a builtin type Symbol, with specified type
pub fn function(
name: Identifier,
ty: Option<PType>,
body: Node<Block>,
params: Vec<Node<Parameter>>
) -> Symbol
[src]
name: Identifier,
ty: Option<PType>,
body: Node<Block>,
params: Vec<Node<Parameter>>
) -> Symbol
Create a function Symbol, with specified type
pub fn ext_function(
name: Identifier,
ty: Option<PType>,
body: ExtFuncIdent,
params: Vec<Node<Parameter>>
) -> Symbol
[src]
name: Identifier,
ty: Option<PType>,
body: ExtFuncIdent,
params: Vec<Node<Parameter>>
) -> Symbol
Create a function Symbol, with specified type
pub fn variable(name: Identifier, ty: Option<PType>) -> Symbol
[src]
Create a variable Symbol
pub fn is_stdlib_func(&self) -> bool
[src]
Return true if symbol is a standard library function
Trait Implementations
impl Clone for Symbol
[src]
fn clone(&self) -> Symbol
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Symbol> for Symbol
[src]
impl Display for Symbol
[src]
impl Debug for Symbol
[src]
impl SymbolStore<Symbol> for Annotation
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.