[][src]Struct rustpython_compiler::symboltable::SymbolTable

pub struct SymbolTable {
    pub name: String,
    pub typ: SymbolTableType,
    pub line_number: usize,
    pub symbols: IndexMap<String, Symbol>,
    pub sub_tables: Vec<SymbolTable>,
}

Captures all symbols in the current scope, and has a list of subscopes in this scope.

Fields

name: String

The name of this symbol table. Often the name of the class or function.

typ: SymbolTableType

The type of symbol table

line_number: usize

The line number in the sourcecode where this symboltable begins.

symbols: IndexMap<String, Symbol>

A set of symbols present on this scope level.

sub_tables: Vec<SymbolTable>

A list of subscopes in the order as found in the AST nodes.

Methods

impl SymbolTable[src]

pub fn lookup(&self, name: &str) -> Option<&Symbol>[src]

Trait Implementations

impl Clone for SymbolTable[src]

impl Debug for SymbolTable[src]

Auto Trait Implementations

impl RefUnwindSafe for SymbolTable

impl Send for SymbolTable

impl Sync for SymbolTable

impl Unpin for SymbolTable

impl UnwindSafe for SymbolTable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.