pub enum Statement {
Show 38 variants InlineHtml(ByteString), Goto { label: Identifier, }, Label { label: Identifier, }, HaltCompiler { content: Option<ByteString>, }, Static { vars: Vec<StaticVar>, }, DoWhile { condition: Expression, body: Block, }, While { condition: Expression, body: Block, }, For { init: Option<Expression>, condition: Option<Expression>, loop: Option<Expression>, then: Block, }, Foreach { expr: Expression, by_ref: bool, key_var: Option<Expression>, value_var: Expression, body: Block, }, Include { kind: IncludeKind, path: Expression, }, Var { var: ByteString, value: Option<Expression>, type: Option<Type>, }, Property { var: ByteString, value: Option<Expression>, type: Option<Type>, flags: Vec<PropertyFlag>, }, Constant { constants: Vec<Constant>, }, ClassConstant { name: Identifier, value: Expression, flags: Vec<ConstFlag>, }, Function { name: Identifier, params: Vec<Param>, body: Block, return_type: Option<Type>, by_ref: bool, }, Class { name: Identifier, extends: Option<Identifier>, implements: Vec<Identifier>, body: Block, flag: Option<ClassFlag>, }, Trait { name: Identifier, body: Block, }, TraitUse { traits: Vec<Identifier>, }, Interface { name: Identifier, extends: Vec<Identifier>, body: Block, }, Method { name: Identifier, params: Vec<Param>, body: Block, flags: Vec<MethodFlag>, return_type: Option<Type>, by_ref: bool, }, If { condition: Expression, then: Block, else_ifs: Vec<ElseIf>, else: Option<Block>, }, Return { value: Option<Expression>, }, Switch { condition: Expression, cases: Vec<Case>, }, Break { num: Option<Expression>, }, Continue { num: Option<Expression>, }, Echo { values: Vec<Expression>, }, Expression { expr: Expression, }, Namespace { name: Option<ByteString>, body: Block, }, Use { uses: Vec<Use>, kind: UseKind, }, GroupUse { prefix: Identifier, kind: UseKind, uses: Vec<Use>, }, Comment { comment: ByteString, }, Try { body: Block, catches: Vec<Catch>, finally: Option<Block>, }, Enum { name: Identifier, implements: Vec<Identifier>, backed_type: Option<BackedEnumType>, body: Block, }, EnumCase { name: Identifier, value: Option<Expression>, }, Block { body: Block, }, Global { vars: Vec<Identifier>, }, Declare { declares: Vec<DeclareItem>, body: Block, }, Noop,
}

Variants§

§

InlineHtml(ByteString)

§

Goto

Fields

§label: Identifier
§

Label

Fields

§label: Identifier
§

HaltCompiler

Fields

§content: Option<ByteString>
§

Static

Fields

§

DoWhile

Fields

§condition: Expression
§body: Block
§

While

Fields

§condition: Expression
§body: Block
§

For

Fields

§condition: Option<Expression>
§then: Block
§

Foreach

Fields

§by_ref: bool
§key_var: Option<Expression>
§value_var: Expression
§body: Block
§

Include

Fields

§

Var

Fields

§type: Option<Type>
§

Property

Fields

§type: Option<Type>
§

Constant

Fields

§constants: Vec<Constant>
§

ClassConstant

Fields

§value: Expression
§flags: Vec<ConstFlag>
§

Function

Fields

§params: Vec<Param>
§body: Block
§return_type: Option<Type>
§by_ref: bool
§

Class

Fields

§extends: Option<Identifier>
§implements: Vec<Identifier>
§body: Block
§

Trait

Fields

§body: Block
§

TraitUse

Fields

§traits: Vec<Identifier>
§

Interface

Fields

§extends: Vec<Identifier>
§body: Block
§

Method

Fields

§params: Vec<Param>
§body: Block
§flags: Vec<MethodFlag>
§return_type: Option<Type>
§by_ref: bool
§

If

Fields

§condition: Expression
§then: Block
§else_ifs: Vec<ElseIf>
§else: Option<Block>
§

Return

Fields

§

Switch

Fields

§condition: Expression
§cases: Vec<Case>
§

Break

Fields

§

Continue

Fields

§

Echo

Fields

§values: Vec<Expression>
§

Expression

Fields

§

Namespace

Fields

§body: Block
§

Use

Fields

§uses: Vec<Use>
§kind: UseKind
§

GroupUse

Fields

§prefix: Identifier
§kind: UseKind
§uses: Vec<Use>
§

Comment

Fields

§comment: ByteString
§

Try

Fields

§body: Block
§catches: Vec<Catch>
§finally: Option<Block>
§

Enum

Fields

§implements: Vec<Identifier>
§backed_type: Option<BackedEnumType>
§body: Block
§

EnumCase

Fields

§

Block

Fields

§body: Block
§

Global

Fields

§

Declare

Fields

§declares: Vec<DeclareItem>
§body: Block
§

Noop

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.