Enum badder_lang::Ast [−][src]
Abstract syntax tree
Variants
Assign(variable_id, ast)
Refer(variable_id)
If(if-expr, resultant-block, Line(If), is_else)
While(if-expr, resultant-block)
ForIn(index-id, item-id, list, block)
LoopNav(break|continue)
AssignFun(function-id, args, block) defines a function
Call(function-id, args)
Literal sequence of expressions
AssignSeq(seq-id, Seq)
ReferSeq(seq-id) refer to a sequence
ReferSeqIndex(seq-id, index)
ReassignSeqIndex(seq-id, index, val)
Line(scope, expr)
LinePair(line, next_line)
Empty(SourceRef)
Implementations
impl Ast
[src]
pub fn bin_op<A: Into<Box<Ast>>>(token: Token, left: A, right: A) -> Ast
[src]
pub fn line_pair<A: Into<Box<Ast>>>(before: A, after: A) -> Ast
[src]
pub fn just_if(expr: Ast, block: Ast, is_else: bool, if_start: SourceRef) -> Ast
[src]
pub fn if_else(
expr: Ast,
block: Ast,
else_if: Ast,
is_else: bool,
if_start: SourceRef
) -> Ast
[src]
expr: Ast,
block: Ast,
else_if: Ast,
is_else: bool,
if_start: SourceRef
) -> Ast
pub fn num(n: Int, src: SourceRef) -> Ast
[src]
pub fn debug_string(&self) -> String
[src]
pub fn src(&self) -> SourceRef
[src]
Trait Implementations
impl Clone for Ast
[src]
impl Debug for Ast
[src]
impl Hash for Ast
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Ast> for Ast
[src]
impl StructuralPartialEq for Ast
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ast
[src]
impl Send for Ast
[src]
impl Sync for Ast
[src]
impl Unpin for Ast
[src]
impl UnwindSafe for Ast
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,