Enum php_parser_rs::Expression
source · pub enum Expression {
Show 45 variants
Empty,
VariadicPlaceholder,
ErrorSuppress {
expr: Box<Self>,
},
Increment {
value: Box<Self>,
},
Decrement {
value: Box<Self>,
},
Int {
i: i64,
},
Float {
f: f64,
},
Variable {
name: ByteString,
},
DynamicVariable {
name: Box<Self>,
},
Infix {
lhs: Box<Self>,
op: InfixOp,
rhs: Box<Self>,
},
Call {
target: Box<Self>,
args: Vec<Arg>,
},
Identifier {
name: ByteString,
},
Array {
items: Vec<ArrayItem>,
},
Closure {
params: Vec<Param>,
uses: Vec<ClosureUse>,
return_type: Option<Type>,
body: Block,
static: bool,
by_ref: bool,
},
ArrowFunction {
params: Vec<Param>,
return_type: Option<Type>,
expr: Box<Self>,
by_ref: bool,
static: bool,
},
New {
target: Box<Self>,
args: Vec<Arg>,
},
ConstantString {
value: ByteString,
},
InterpolatedString {
parts: Vec<StringPart>,
},
PropertyFetch {
target: Box<Self>,
property: Box<Self>,
},
NullsafePropertyFetch {
target: Box<Self>,
property: Box<Self>,
},
NullsafeMethodCall {
target: Box<Self>,
method: Box<Self>,
args: Vec<Arg>,
},
StaticPropertyFetch {
target: Box<Self>,
property: Box<Self>,
},
ConstFetch {
target: Box<Self>,
constant: Identifier,
},
MethodCall {
target: Box<Self>,
method: Box<Self>,
args: Vec<Arg>,
},
StaticMethodCall {
target: Box<Self>,
method: Box<Self>,
args: Vec<Arg>,
},
AnonymousClass {
extends: Option<Identifier>,
implements: Vec<Identifier>,
body: Block,
},
Bool {
value: bool,
},
ArrayIndex {
array: Box<Self>,
index: Option<Box<Self>>,
},
Null,
BooleanNot {
value: Box<Self>,
},
MagicConst {
constant: MagicConst,
},
Ternary {
condition: Box<Self>,
then: Option<Box<Self>>,
else: Box<Self>,
},
Coalesce {
lhs: Box<Self>,
rhs: Box<Self>,
},
Clone {
target: Box<Self>,
},
Match {
condition: Box<Self>,
arms: Vec<MatchArm>,
},
Throw {
value: Box<Expression>,
},
Yield {
key: Option<Box<Self>>,
value: Option<Box<Self>>,
},
YieldFrom {
value: Box<Self>,
},
Negate {
value: Box<Self>,
},
UnaryPlus {
value: Box<Self>,
},
BitwiseNot {
value: Box<Self>,
},
PreDecrement {
value: Box<Self>,
},
PreIncrement {
value: Box<Self>,
},
Print {
value: Box<Self>,
},
Cast {
kind: CastKind,
value: Box<Self>,
},
}
Variants§
Empty
VariadicPlaceholder
ErrorSuppress
Increment
Decrement
Int
Float
Variable
Fields
§
name: ByteString
DynamicVariable
Infix
Call
Identifier
Fields
§
name: ByteString
Array
Closure
Fields
§
uses: Vec<ClosureUse>
ArrowFunction
New
ConstantString
Fields
§
value: ByteString
InterpolatedString
Fields
§
parts: Vec<StringPart>
PropertyFetch
NullsafePropertyFetch
NullsafeMethodCall
StaticPropertyFetch
ConstFetch
MethodCall
StaticMethodCall
AnonymousClass
Bool
ArrayIndex
Null
BooleanNot
MagicConst
Fields
§
constant: MagicConst
Ternary
Coalesce
Clone
Match
Throw
Fields
§
value: Box<Expression>
Yield
YieldFrom
Negate
UnaryPlus
BitwiseNot
PreDecrement
PreIncrement
Cast
Trait Implementations§
source§impl Clone for Expression
impl Clone for Expression
source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more