[][src]Enum lib_ruby_parser::nodes::Node

pub enum Node {
    Alias(Box<Alias>),
    And(Box<And>),
    AndAsgn(Box<AndAsgn>),
    Arg(Box<Arg>),
    Args(Box<Args>),
    Array(Box<Array>),
    ArrayPattern(Box<ArrayPattern>),
    ArrayPatternWithTail(Box<ArrayPatternWithTail>),
    BackRef(Box<BackRef>),
    Begin(Box<Begin>),
    Block(Box<Block>),
    Blockarg(Box<Blockarg>),
    BlockPass(Box<BlockPass>),
    Break(Box<Break>),
    Case(Box<Case>),
    CaseMatch(Box<CaseMatch>),
    Casgn(Box<Casgn>),
    Cbase(Box<Cbase>),
    Class(Box<Class>),
    Complex(Box<Complex>),
    Const(Box<Const>),
    ConstPattern(Box<ConstPattern>),
    CSend(Box<CSend>),
    Cvar(Box<Cvar>),
    Cvasgn(Box<Cvasgn>),
    Def(Box<Def>),
    Defined(Box<Defined>),
    Defs(Box<Defs>),
    Dstr(Box<Dstr>),
    Dsym(Box<Dsym>),
    EFlipFlop(Box<EFlipFlop>),
    EmptyElse(Box<EmptyElse>),
    Encoding(Box<Encoding>),
    Ensure(Box<Ensure>),
    Erange(Box<Erange>),
    False(Box<False>),
    File(Box<File>),
    FindPattern(Box<FindPattern>),
    Float(Box<Float>),
    For(Box<For>),
    ForwardArg(Box<ForwardArg>),
    ForwardedArgs(Box<ForwardedArgs>),
    Gvar(Box<Gvar>),
    Gvasgn(Box<Gvasgn>),
    Hash(Box<Hash>),
    HashPattern(Box<HashPattern>),
    Heredoc(Box<Heredoc>),
    If(Box<If>),
    IfGuard(Box<IfGuard>),
    IFlipFlop(Box<IFlipFlop>),
    IfMod(Box<IfMod>),
    IfTernary(Box<IfTernary>),
    Index(Box<Index>),
    IndexAsgn(Box<IndexAsgn>),
    InMatch(Box<InMatch>),
    InPattern(Box<InPattern>),
    Int(Box<Int>),
    Irange(Box<Irange>),
    Ivar(Box<Ivar>),
    Ivasgn(Box<Ivasgn>),
    Kwarg(Box<Kwarg>),
    KwBegin(Box<KwBegin>),
    Kwnilarg(Box<Kwnilarg>),
    Kwoptarg(Box<Kwoptarg>),
    Kwrestarg(Box<Kwrestarg>),
    Kwsplat(Box<Kwsplat>),
    Lambda(Box<Lambda>),
    Line(Box<Line>),
    Lvar(Box<Lvar>),
    Lvasgn(Box<Lvasgn>),
    Masgn(Box<Masgn>),
    MatchAlt(Box<MatchAlt>),
    MatchAs(Box<MatchAs>),
    MatchCurrentLine(Box<MatchCurrentLine>),
    MatchNilPattern(Box<MatchNilPattern>),
    MatchRest(Box<MatchRest>),
    MatchVar(Box<MatchVar>),
    MatchWithLvasgn(Box<MatchWithLvasgn>),
    Mlhs(Box<Mlhs>),
    Module(Box<Module>),
    Next(Box<Next>),
    Nil(Box<Nil>),
    NthRef(Box<NthRef>),
    Numblock(Box<Numblock>),
    OpAsgn(Box<OpAsgn>),
    Optarg(Box<Optarg>),
    Or(Box<Or>),
    OrAsgn(Box<OrAsgn>),
    Pair(Box<Pair>),
    Pin(Box<Pin>),
    Postexe(Box<Postexe>),
    Preexe(Box<Preexe>),
    Procarg0(Box<Procarg0>),
    Rational(Box<Rational>),
    Redo(Box<Redo>),
    Regexp(Box<Regexp>),
    RegOpt(Box<RegOpt>),
    Rescue(Box<Rescue>),
    RescueBody(Box<RescueBody>),
    Restarg(Box<Restarg>),
    Retry(Box<Retry>),
    Return(Box<Return>),
    SClass(Box<SClass>),
    Self_(Box<Self_>),
    Send(Box<Send>),
    Shadowarg(Box<Shadowarg>),
    Splat(Box<Splat>),
    Str(Box<Str>),
    Super(Box<Super>),
    Sym(Box<Sym>),
    True(Box<True>),
    Undef(Box<Undef>),
    UnlessGuard(Box<UnlessGuard>),
    Until(Box<Until>),
    UntilPost(Box<UntilPost>),
    When(Box<When>),
    While(Box<While>),
    WhilePost(Box<WhilePost>),
    XHeredoc(Box<XHeredoc>),
    Xstr(Box<Xstr>),
    Yield(Box<Yield>),
    ZSuper(Box<ZSuper>),
}

Generic combination of all known nodes.

Variants

Alias(Box<Alias>)
And(Box<And>)
AndAsgn(Box<AndAsgn>)
Arg(Box<Arg>)
Args(Box<Args>)
Array(Box<Array>)
ArrayPattern(Box<ArrayPattern>)
ArrayPatternWithTail(Box<ArrayPatternWithTail>)
BackRef(Box<BackRef>)
Begin(Box<Begin>)
Block(Box<Block>)
Blockarg(Box<Blockarg>)
BlockPass(Box<BlockPass>)
Break(Box<Break>)
Case(Box<Case>)
CaseMatch(Box<CaseMatch>)
Casgn(Box<Casgn>)
Cbase(Box<Cbase>)
Class(Box<Class>)
Complex(Box<Complex>)
Const(Box<Const>)
ConstPattern(Box<ConstPattern>)
CSend(Box<CSend>)
Cvar(Box<Cvar>)
Cvasgn(Box<Cvasgn>)
Def(Box<Def>)
Defined(Box<Defined>)
Defs(Box<Defs>)
Dstr(Box<Dstr>)
Dsym(Box<Dsym>)
EFlipFlop(Box<EFlipFlop>)
EmptyElse(Box<EmptyElse>)
Encoding(Box<Encoding>)
Ensure(Box<Ensure>)
Erange(Box<Erange>)
False(Box<False>)
File(Box<File>)
FindPattern(Box<FindPattern>)
Float(Box<Float>)
For(Box<For>)
ForwardArg(Box<ForwardArg>)
ForwardedArgs(Box<ForwardedArgs>)
Gvar(Box<Gvar>)
Gvasgn(Box<Gvasgn>)
Hash(Box<Hash>)
HashPattern(Box<HashPattern>)
Heredoc(Box<Heredoc>)
If(Box<If>)
IfGuard(Box<IfGuard>)
IFlipFlop(Box<IFlipFlop>)
IfMod(Box<IfMod>)
IfTernary(Box<IfTernary>)
Index(Box<Index>)
IndexAsgn(Box<IndexAsgn>)
InMatch(Box<InMatch>)
InPattern(Box<InPattern>)
Int(Box<Int>)
Irange(Box<Irange>)
Ivar(Box<Ivar>)
Ivasgn(Box<Ivasgn>)
Kwarg(Box<Kwarg>)
KwBegin(Box<KwBegin>)
Kwnilarg(Box<Kwnilarg>)
Kwoptarg(Box<Kwoptarg>)
Kwrestarg(Box<Kwrestarg>)
Kwsplat(Box<Kwsplat>)
Lambda(Box<Lambda>)
Line(Box<Line>)
Lvar(Box<Lvar>)
Lvasgn(Box<Lvasgn>)
Masgn(Box<Masgn>)
MatchAlt(Box<MatchAlt>)
MatchAs(Box<MatchAs>)
MatchCurrentLine(Box<MatchCurrentLine>)
MatchNilPattern(Box<MatchNilPattern>)
MatchRest(Box<MatchRest>)
MatchVar(Box<MatchVar>)
MatchWithLvasgn(Box<MatchWithLvasgn>)
Mlhs(Box<Mlhs>)
Module(Box<Module>)
Next(Box<Next>)
Nil(Box<Nil>)
NthRef(Box<NthRef>)
Numblock(Box<Numblock>)
OpAsgn(Box<OpAsgn>)
Optarg(Box<Optarg>)
Or(Box<Or>)
OrAsgn(Box<OrAsgn>)
Pair(Box<Pair>)
Pin(Box<Pin>)
Postexe(Box<Postexe>)
Preexe(Box<Preexe>)
Procarg0(Box<Procarg0>)
Rational(Box<Rational>)
Redo(Box<Redo>)
Regexp(Box<Regexp>)
RegOpt(Box<RegOpt>)
Rescue(Box<Rescue>)
RescueBody(Box<RescueBody>)
Restarg(Box<Restarg>)
Retry(Box<Retry>)
Return(Box<Return>)
SClass(Box<SClass>)
Self_(Box<Self_>)
Send(Box<Send>)
Shadowarg(Box<Shadowarg>)
Splat(Box<Splat>)
Str(Box<Str>)
Super(Box<Super>)
Sym(Box<Sym>)
True(Box<True>)
Undef(Box<Undef>)
UnlessGuard(Box<UnlessGuard>)
Until(Box<Until>)
UntilPost(Box<UntilPost>)
When(Box<When>)
While(Box<While>)
WhilePost(Box<WhilePost>)
XHeredoc(Box<XHeredoc>)
Xstr(Box<Xstr>)
Yield(Box<Yield>)
ZSuper(Box<ZSuper>)

Implementations

impl Node[src]

pub fn inspect(&self, indent: usize) -> String[src]

Returs a whitequark/parser -like representation of self.

Used in tests and example scripts

pub fn expression(&self) -> &Range[src]

Returns location of the full node expression

pub fn str_type(&self) -> &'static str[src]

Returns a whitequark/parser -like node name.

Used in tests and example scripts

pub fn print_with_locs(&self)[src]

Prints itself + location information

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl PartialEq<Node> for Node[src]

impl StructuralPartialEq for Node[src]

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

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.