[][src]Struct moore_svlog::GlobalContext

pub struct GlobalContext<'gcx> {
    pub sess: &'gcx Session,
    pub arena: &'gcx GlobalArenas<'gcx>,
    // some fields omitted
}

The central data structure of the compiler. It stores references to various arenas and tables that store the results of the various computations that have been performed.

Fields

sess: &'gcx Session

The global compiler session.

arena: &'gcx GlobalArenas<'gcx>

The arena that owns all references.

Methods

impl<'gcx> GlobalContext<'gcx>[src]

pub fn new(sess: &'gcx Session, arena: &'gcx GlobalArenas<'gcx>) -> Self[src]

Create a new global context.

pub fn add_root_nodes(&self, ast: impl Iterator<Item = &'gcx Root>)[src]

Add root AST nodes to the context for processing.

Use the find_global_item function afterwards to look up the id of modules that were added.

pub fn find_module(&self, name: Name) -> Option<NodeId>[src]

Find a module in the AST.

pub fn modules(&self) -> impl Iterator<Item = (Name, NodeId)>[src]

Get an iterator over all modules in the AST.

pub fn find_package(&self, name: Name) -> Option<NodeId>[src]

Find a package in the AST.

Trait Implementations

impl<'gcx> BaseContext<'gcx> for GlobalContext<'gcx>[src]

impl<'gcx> Context<'gcx> for GlobalContext<'gcx>[src]

impl<'_> DiagEmitter for GlobalContext<'_>[src]

Auto Trait Implementations

impl<'gcx> !RefUnwindSafe for GlobalContext<'gcx>

impl<'gcx> !Send for GlobalContext<'gcx>

impl<'gcx> !Sync for GlobalContext<'gcx>

impl<'gcx> Unpin for GlobalContext<'gcx>

impl<'gcx> !UnwindSafe for GlobalContext<'gcx>

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> Erased for T

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

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

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.