[][src]Struct koto_parser::Ast

pub struct Ast { /* fields omitted */ }

A Koto program represented as an Abstract Syntax Tree

This is produced by the parser, and consumed by the compiler.

Implementations

impl Ast[src]

pub fn with_capacity(capacity: usize) -> Self[src]

pub fn clear(&mut self)[src]

pub fn push(&mut self, node: Node, span: Span) -> Result<AstIndex, ParserError>[src]

pub fn push_with_span_index(
    &mut self,
    node: Node,
    span_index: AstIndex
) -> Result<AstIndex, ParserError>
[src]

pub fn node(&self, index: AstIndex) -> &AstNode[src]

pub fn span(&self, index: AstIndex) -> &Span[src]

pub fn set_entry_point(&mut self, index: AstIndex)[src]

pub fn entry_point(&self) -> Option<&AstNode>[src]

pub fn reset_point(&self) -> (usize, usize)[src]

pub fn reset(&mut self, reset_point: (usize, usize))[src]

pub fn nodes(&self) -> &[AstNode][src]

Trait Implementations

impl Debug for Ast[src]

impl Default for Ast[src]

Auto Trait Implementations

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, 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.