[][src]Struct lark_hir::FnBodyTables

pub struct FnBodyTables {
    pub expressions: IndexVec<Expression, ExpressionData>,
    pub identified_expressions: IndexVec<IdentifiedExpression, IdentifiedExpressionData>,
    pub places: IndexVec<Place, PlaceData>,
    pub variables: IndexVec<Variable, VariableData>,
    pub identifiers: IndexVec<Identifier, IdentifierData>,
    pub errors: IndexVec<Error, ErrorData>,
    pub spans: FxIndexMap<MetaIndex, Span<FileName>>,
    pub list_entries: Vec<u32>,
}

All the data for a fn-body is stored in these tables.a

Fields

expressions: IndexVec<Expression, ExpressionData>

Map each expression index to its associated data.

identified_expressions: IndexVec<IdentifiedExpression, IdentifiedExpressionData>

A a: b pair.

places: IndexVec<Place, PlaceData>

Map each place index to its associated data.

variables: IndexVec<Variable, VariableData>

Map each variable index to its associated data.

identifiers: IndexVec<Identifier, IdentifierData>

Map each identifier index to its associated data.

errors: IndexVec<Error, ErrorData>

Errors we encountered constructing the hir

spans: FxIndexMap<MetaIndex, Span<FileName>>

Spans corresponding to each index

list_entries: Vec<u32>

The data values for any List<I> values that appear elsewhere in the HIR; the way this works is that all of the list value are concatenated into one big vector, and each list just pulls out a slice of that. Note that this just contains u32 values -- the actual List<I> remembers the index type I for its own values and does the casting back and forth.

Methods

impl FnBodyTables[src]

pub fn add<D: HirIndexData>(
    &mut self,
    span: Span<FileName>,
    node: D
) -> D::Index
[src]

impl FnBodyTables[src]

pub fn span(
    &self,
    index: impl SpanIndex
) -> Span<FileName>
[src]

Get the span for the given part of the HIR.

Trait Implementations

impl Eq for FnBodyTables[src]

impl Clone for FnBodyTables[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl AsMut<FnBodyTables> for FnBodyTables[src]

impl PartialEq<FnBodyTables> for FnBodyTables[src]

impl AsRef<FnBodyTables> for FnBody[src]

impl AsRef<FnBodyTables> for Arc<FnBody>[src]

impl Default for FnBodyTables[src]

impl<I> Index<I> for FnBodyTables where
    I: HirIndex
[src]

type Output = I::Data

The returned type after indexing.

impl Debug for FnBodyTables[src]

impl DebugWith for FnBodyTables[src]

fn debug_with<Cx>(&'me self, cx: &'me Cx) -> DebugCxPair<'me, &'me Self, Cx> where
    Cx: ?Sized
[src]

fn into_debug_with<Cx>(self, cx: &'me Cx) -> DebugCxPair<'me, Self, Cx> where
    Cx: ?Sized
[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<Cx, T> FmtWithSpecialized for T where
    Cx: ?Sized,
    T: Debug + ?Sized
[src]

impl<T> Erased for T