Skip to main content

AnyNode

Enum AnyNode 

Source
pub enum AnyNode<'tree> {
Show 162 variants Expression(Expression<'tree>), Literal(Literal<'tree>), PrimaryExpression(PrimaryExpression<'tree>), Statement(Statement<'tree>), Type(Type<'tree>), AbstractModifier(AbstractModifier<'tree>), AnonymousClass(AnonymousClass<'tree>), AnonymousFunction(AnonymousFunction<'tree>), AnonymousFunctionUseClause(AnonymousFunctionUseClause<'tree>), Argument(Argument<'tree>), Arguments(Arguments<'tree>), ArrayCreationExpression(ArrayCreationExpression<'tree>), ArrayElementInitializer(ArrayElementInitializer<'tree>), ArrowFunction(ArrowFunction<'tree>), AssignmentExpression(AssignmentExpression<'tree>), Attribute(Attribute<'tree>), AttributeGroup(AttributeGroup<'tree>), AttributeList(AttributeList<'tree>), AugmentedAssignmentExpression(AugmentedAssignmentExpression<'tree>), BaseClause(BaseClause<'tree>), BinaryExpression(BinaryExpression<'tree>), Boolean(Boolean<'tree>), BreakStatement(BreakStatement<'tree>), ByRef(ByRef<'tree>), CaseStatement(CaseStatement<'tree>), CastExpression(CastExpression<'tree>), CastType(CastType<'tree>), CatchClause(CatchClause<'tree>), ClassConstantAccessExpression(ClassConstantAccessExpression<'tree>), ClassDeclaration(ClassDeclaration<'tree>), ClassInterfaceClause(ClassInterfaceClause<'tree>), CloneExpression(CloneExpression<'tree>), ColonBlock(ColonBlock<'tree>), CompoundStatement(CompoundStatement<'tree>), ConditionalExpression(ConditionalExpression<'tree>), ConstDeclaration(ConstDeclaration<'tree>), ConstElement(ConstElement<'tree>), ContinueStatement(ContinueStatement<'tree>), DeclarationList(DeclarationList<'tree>), DeclareDirective(DeclareDirective<'tree>), DeclareStatement(DeclareStatement<'tree>), DefaultStatement(DefaultStatement<'tree>), DisjunctiveNormalFormType(DisjunctiveNormalFormType<'tree>), DoStatement(DoStatement<'tree>), DynamicVariableName(DynamicVariableName<'tree>), EchoStatement(EchoStatement<'tree>), ElseClause(ElseClause<'tree>), ElseIfClause(ElseIfClause<'tree>), EmptyStatement(EmptyStatement<'tree>), EncapsedString(EncapsedString<'tree>), EnumCase(EnumCase<'tree>), EnumDeclaration(EnumDeclaration<'tree>), EnumDeclarationList(EnumDeclarationList<'tree>), ErrorSuppressionExpression(ErrorSuppressionExpression<'tree>), ExitStatement(ExitStatement<'tree>), ExpressionStatement(ExpressionStatement<'tree>), FinalModifier(FinalModifier<'tree>), FinallyClause(FinallyClause<'tree>), ForStatement(ForStatement<'tree>), ForeachStatement(ForeachStatement<'tree>), FormalParameters(FormalParameters<'tree>), FunctionCallExpression(FunctionCallExpression<'tree>), FunctionDefinition(FunctionDefinition<'tree>), FunctionStaticDeclaration(FunctionStaticDeclaration<'tree>), GlobalDeclaration(GlobalDeclaration<'tree>), GotoStatement(GotoStatement<'tree>), Heredoc(Heredoc<'tree>), HeredocBody(HeredocBody<'tree>), IfStatement(IfStatement<'tree>), IncludeExpression(IncludeExpression<'tree>), IncludeOnceExpression(IncludeOnceExpression<'tree>), InterfaceDeclaration(InterfaceDeclaration<'tree>), IntersectionType(IntersectionType<'tree>), ListLiteral(ListLiteral<'tree>), MatchBlock(MatchBlock<'tree>), MatchConditionList(MatchConditionList<'tree>), MatchConditionalExpression(MatchConditionalExpression<'tree>), MatchDefaultExpression(MatchDefaultExpression<'tree>), MatchExpression(MatchExpression<'tree>), MemberAccessExpression(MemberAccessExpression<'tree>), MemberCallExpression(MemberCallExpression<'tree>), MethodDeclaration(MethodDeclaration<'tree>), Name(Name<'tree>), NamedLabelStatement(NamedLabelStatement<'tree>), NamedType(NamedType<'tree>), NamespaceDefinition(NamespaceDefinition<'tree>), NamespaceName(NamespaceName<'tree>), NamespaceUseClause(NamespaceUseClause<'tree>), NamespaceUseDeclaration(NamespaceUseDeclaration<'tree>), NamespaceUseGroup(NamespaceUseGroup<'tree>), Nowdoc(Nowdoc<'tree>), NowdocBody(NowdocBody<'tree>), Null(Null<'tree>), NullsafeMemberAccessExpression(NullsafeMemberAccessExpression<'tree>), NullsafeMemberCallExpression(NullsafeMemberCallExpression<'tree>), ObjectCreationExpression(ObjectCreationExpression<'tree>), OptionalType(OptionalType<'tree>), Pair(Pair<'tree>), ParenthesizedExpression(ParenthesizedExpression<'tree>), PrimitiveType(PrimitiveType<'tree>), PrintIntrinsic(PrintIntrinsic<'tree>), Program(Program<'tree>), PropertyDeclaration(PropertyDeclaration<'tree>), PropertyElement(PropertyElement<'tree>), PropertyHook(PropertyHook<'tree>), PropertyHookList(PropertyHookList<'tree>), PropertyPromotionParameter(PropertyPromotionParameter<'tree>), QualifiedName(QualifiedName<'tree>), ReadonlyModifier(ReadonlyModifier<'tree>), ReferenceAssignmentExpression(ReferenceAssignmentExpression<'tree>), ReferenceModifier(ReferenceModifier<'tree>), RelativeName(RelativeName<'tree>), RelativeScope(RelativeScope<'tree>), RequireExpression(RequireExpression<'tree>), RequireOnceExpression(RequireOnceExpression<'tree>), ReturnStatement(ReturnStatement<'tree>), ScopedCallExpression(ScopedCallExpression<'tree>), ScopedPropertyAccessExpression(ScopedPropertyAccessExpression<'tree>), SequenceExpression(SequenceExpression<'tree>), ShellCommandExpression(ShellCommandExpression<'tree>), SimpleParameter(SimpleParameter<'tree>), StaticModifier(StaticModifier<'tree>), StaticVariableDeclaration(StaticVariableDeclaration<'tree>), String(String<'tree>), StringContent(StringContent<'tree>), SubscriptExpression(SubscriptExpression<'tree>), SwitchBlock(SwitchBlock<'tree>), SwitchStatement(SwitchStatement<'tree>), Text(Text<'tree>), TextInterpolation(TextInterpolation<'tree>), ThrowExpression(ThrowExpression<'tree>), TraitDeclaration(TraitDeclaration<'tree>), TryStatement(TryStatement<'tree>), TypeList(TypeList<'tree>), UnaryOpExpression(UnaryOpExpression<'tree>), UnionType(UnionType<'tree>), UnsetStatement(UnsetStatement<'tree>), UpdateExpression(UpdateExpression<'tree>), UseAsClause(UseAsClause<'tree>), UseDeclaration(UseDeclaration<'tree>), UseInsteadOfClause(UseInsteadOfClause<'tree>), UseList(UseList<'tree>), VariableName(VariableName<'tree>), VariadicParameter(VariadicParameter<'tree>), VariadicPlaceholder(VariadicPlaceholder<'tree>), VariadicUnpacking(VariadicUnpacking<'tree>), VisibilityModifier(VisibilityModifier<'tree>), WhileStatement(WhileStatement<'tree>), YieldExpression(YieldExpression<'tree>), BottomType(BottomType<'tree>), Comment(Comment<'tree>), EscapeSequence(EscapeSequence<'tree>), Float(Float<'tree>), HeredocEnd(HeredocEnd<'tree>), HeredocStart(HeredocStart<'tree>), Integer(Integer<'tree>), NowdocString(NowdocString<'tree>), Operation(Operation<'tree>), PhpEndTag(PhpEndTag<'tree>), PhpTag(PhpTag<'tree>), VarModifier(VarModifier<'tree>), Unknown(Node<'tree>),
}

Variants§

§

Expression(Expression<'tree>)

§

Literal(Literal<'tree>)

§

PrimaryExpression(PrimaryExpression<'tree>)

§

Statement(Statement<'tree>)

§

Type(Type<'tree>)

§

AbstractModifier(AbstractModifier<'tree>)

§

AnonymousClass(AnonymousClass<'tree>)

§

AnonymousFunction(AnonymousFunction<'tree>)

§

AnonymousFunctionUseClause(AnonymousFunctionUseClause<'tree>)

§

Argument(Argument<'tree>)

§

Arguments(Arguments<'tree>)

§

ArrayCreationExpression(ArrayCreationExpression<'tree>)

§

ArrayElementInitializer(ArrayElementInitializer<'tree>)

§

ArrowFunction(ArrowFunction<'tree>)

§

AssignmentExpression(AssignmentExpression<'tree>)

§

Attribute(Attribute<'tree>)

§

AttributeGroup(AttributeGroup<'tree>)

§

AttributeList(AttributeList<'tree>)

§

AugmentedAssignmentExpression(AugmentedAssignmentExpression<'tree>)

§

BaseClause(BaseClause<'tree>)

§

BinaryExpression(BinaryExpression<'tree>)

§

Boolean(Boolean<'tree>)

§

BreakStatement(BreakStatement<'tree>)

§

ByRef(ByRef<'tree>)

§

CaseStatement(CaseStatement<'tree>)

§

CastExpression(CastExpression<'tree>)

§

CastType(CastType<'tree>)

§

CatchClause(CatchClause<'tree>)

§

ClassConstantAccessExpression(ClassConstantAccessExpression<'tree>)

§

ClassDeclaration(ClassDeclaration<'tree>)

§

ClassInterfaceClause(ClassInterfaceClause<'tree>)

§

CloneExpression(CloneExpression<'tree>)

§

ColonBlock(ColonBlock<'tree>)

§

CompoundStatement(CompoundStatement<'tree>)

§

ConditionalExpression(ConditionalExpression<'tree>)

§

ConstDeclaration(ConstDeclaration<'tree>)

§

ConstElement(ConstElement<'tree>)

§

ContinueStatement(ContinueStatement<'tree>)

§

DeclarationList(DeclarationList<'tree>)

§

DeclareDirective(DeclareDirective<'tree>)

§

DeclareStatement(DeclareStatement<'tree>)

§

DefaultStatement(DefaultStatement<'tree>)

§

DisjunctiveNormalFormType(DisjunctiveNormalFormType<'tree>)

§

DoStatement(DoStatement<'tree>)

§

DynamicVariableName(DynamicVariableName<'tree>)

§

EchoStatement(EchoStatement<'tree>)

§

ElseClause(ElseClause<'tree>)

§

ElseIfClause(ElseIfClause<'tree>)

§

EmptyStatement(EmptyStatement<'tree>)

§

EncapsedString(EncapsedString<'tree>)

§

EnumCase(EnumCase<'tree>)

§

EnumDeclaration(EnumDeclaration<'tree>)

§

EnumDeclarationList(EnumDeclarationList<'tree>)

§

ErrorSuppressionExpression(ErrorSuppressionExpression<'tree>)

§

ExitStatement(ExitStatement<'tree>)

§

ExpressionStatement(ExpressionStatement<'tree>)

§

FinalModifier(FinalModifier<'tree>)

§

FinallyClause(FinallyClause<'tree>)

§

ForStatement(ForStatement<'tree>)

§

ForeachStatement(ForeachStatement<'tree>)

§

FormalParameters(FormalParameters<'tree>)

§

FunctionCallExpression(FunctionCallExpression<'tree>)

§

FunctionDefinition(FunctionDefinition<'tree>)

§

FunctionStaticDeclaration(FunctionStaticDeclaration<'tree>)

§

GlobalDeclaration(GlobalDeclaration<'tree>)

§

GotoStatement(GotoStatement<'tree>)

§

Heredoc(Heredoc<'tree>)

§

HeredocBody(HeredocBody<'tree>)

§

IfStatement(IfStatement<'tree>)

§

IncludeExpression(IncludeExpression<'tree>)

§

IncludeOnceExpression(IncludeOnceExpression<'tree>)

§

InterfaceDeclaration(InterfaceDeclaration<'tree>)

§

IntersectionType(IntersectionType<'tree>)

§

ListLiteral(ListLiteral<'tree>)

§

MatchBlock(MatchBlock<'tree>)

§

MatchConditionList(MatchConditionList<'tree>)

§

MatchConditionalExpression(MatchConditionalExpression<'tree>)

§

MatchDefaultExpression(MatchDefaultExpression<'tree>)

§

MatchExpression(MatchExpression<'tree>)

§

MemberAccessExpression(MemberAccessExpression<'tree>)

§

MemberCallExpression(MemberCallExpression<'tree>)

§

MethodDeclaration(MethodDeclaration<'tree>)

§

Name(Name<'tree>)

§

NamedLabelStatement(NamedLabelStatement<'tree>)

§

NamedType(NamedType<'tree>)

§

NamespaceDefinition(NamespaceDefinition<'tree>)

§

NamespaceName(NamespaceName<'tree>)

§

NamespaceUseClause(NamespaceUseClause<'tree>)

§

NamespaceUseDeclaration(NamespaceUseDeclaration<'tree>)

§

NamespaceUseGroup(NamespaceUseGroup<'tree>)

§

Nowdoc(Nowdoc<'tree>)

§

NowdocBody(NowdocBody<'tree>)

§

Null(Null<'tree>)

§

NullsafeMemberAccessExpression(NullsafeMemberAccessExpression<'tree>)

§

NullsafeMemberCallExpression(NullsafeMemberCallExpression<'tree>)

§

ObjectCreationExpression(ObjectCreationExpression<'tree>)

§

OptionalType(OptionalType<'tree>)

§

Pair(Pair<'tree>)

§

ParenthesizedExpression(ParenthesizedExpression<'tree>)

§

PrimitiveType(PrimitiveType<'tree>)

§

PrintIntrinsic(PrintIntrinsic<'tree>)

§

Program(Program<'tree>)

§

PropertyDeclaration(PropertyDeclaration<'tree>)

§

PropertyElement(PropertyElement<'tree>)

§

PropertyHook(PropertyHook<'tree>)

§

PropertyHookList(PropertyHookList<'tree>)

§

PropertyPromotionParameter(PropertyPromotionParameter<'tree>)

§

QualifiedName(QualifiedName<'tree>)

§

ReadonlyModifier(ReadonlyModifier<'tree>)

§

ReferenceAssignmentExpression(ReferenceAssignmentExpression<'tree>)

§

ReferenceModifier(ReferenceModifier<'tree>)

§

RelativeName(RelativeName<'tree>)

§

RelativeScope(RelativeScope<'tree>)

§

RequireExpression(RequireExpression<'tree>)

§

RequireOnceExpression(RequireOnceExpression<'tree>)

§

ReturnStatement(ReturnStatement<'tree>)

§

ScopedCallExpression(ScopedCallExpression<'tree>)

§

ScopedPropertyAccessExpression(ScopedPropertyAccessExpression<'tree>)

§

SequenceExpression(SequenceExpression<'tree>)

§

ShellCommandExpression(ShellCommandExpression<'tree>)

§

SimpleParameter(SimpleParameter<'tree>)

§

StaticModifier(StaticModifier<'tree>)

§

StaticVariableDeclaration(StaticVariableDeclaration<'tree>)

§

String(String<'tree>)

§

StringContent(StringContent<'tree>)

§

SubscriptExpression(SubscriptExpression<'tree>)

§

SwitchBlock(SwitchBlock<'tree>)

§

SwitchStatement(SwitchStatement<'tree>)

§

Text(Text<'tree>)

§

TextInterpolation(TextInterpolation<'tree>)

§

ThrowExpression(ThrowExpression<'tree>)

§

TraitDeclaration(TraitDeclaration<'tree>)

§

TryStatement(TryStatement<'tree>)

§

TypeList(TypeList<'tree>)

§

UnaryOpExpression(UnaryOpExpression<'tree>)

§

UnionType(UnionType<'tree>)

§

UnsetStatement(UnsetStatement<'tree>)

§

UpdateExpression(UpdateExpression<'tree>)

§

UseAsClause(UseAsClause<'tree>)

§

UseDeclaration(UseDeclaration<'tree>)

§

UseInsteadOfClause(UseInsteadOfClause<'tree>)

§

UseList(UseList<'tree>)

§

VariableName(VariableName<'tree>)

§

VariadicParameter(VariadicParameter<'tree>)

§

VariadicPlaceholder(VariadicPlaceholder<'tree>)

§

VariadicUnpacking(VariadicUnpacking<'tree>)

§

VisibilityModifier(VisibilityModifier<'tree>)

§

WhileStatement(WhileStatement<'tree>)

§

YieldExpression(YieldExpression<'tree>)

§

BottomType(BottomType<'tree>)

§

Comment(Comment<'tree>)

§

EscapeSequence(EscapeSequence<'tree>)

§

Float(Float<'tree>)

§

HeredocEnd(HeredocEnd<'tree>)

§

HeredocStart(HeredocStart<'tree>)

§

Integer(Integer<'tree>)

§

NowdocString(NowdocString<'tree>)

§

Operation(Operation<'tree>)

§

PhpEndTag(PhpEndTag<'tree>)

§

PhpTag(PhpTag<'tree>)

§

VarModifier(VarModifier<'tree>)

§

Unknown(Node<'tree>)

Implementations§

Source§

impl<'tree> AnyNode<'tree>

Source

pub fn from_node(node: Node<'tree>, src: &'tree [u8]) -> Self

Trait Implementations§

Source§

impl<'tree> Clone for AnyNode<'tree>

Source§

fn clone(&self) -> AnyNode<'tree>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'tree> Debug for AnyNode<'tree>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Spanned for AnyNode<'_>

Source§

fn span(&self) -> Span

Source§

fn start(&self) -> Point

Source§

fn end(&self) -> Point

Auto Trait Implementations§

§

impl<'tree> Freeze for AnyNode<'tree>

§

impl<'tree> RefUnwindSafe for AnyNode<'tree>

§

impl<'tree> Send for AnyNode<'tree>

§

impl<'tree> Sync for AnyNode<'tree>

§

impl<'tree> Unpin for AnyNode<'tree>

§

impl<'tree> UnsafeUnpin for AnyNode<'tree>

§

impl<'tree> UnwindSafe for AnyNode<'tree>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.