Enum php_parser_rs::parser::ast::Statement
source · pub enum Statement {
Show 36 variants
FullOpeningTag(Span),
ShortOpeningTag(Span),
EchoOpeningTag(Span),
ClosingTag(Span),
InlineHtml(ByteString),
GotoLabel(GotoLabel),
Goto(GotoStatement),
HaltCompiler {
content: Option<ByteString>,
},
Static {
vars: Vec<StaticVar>,
},
DoWhile(DoWhileStatement),
While(WhileStatement),
For(ForStatement),
Foreach(ForeachStatement),
Break(BreakStatement),
Continue(ContinueStatement),
Constant(Constant),
Function(Function),
Class(Class),
Trait(Trait),
Interface(Interface),
If(IfStatement),
Switch {
condition: Parenthesized<Expression>,
cases: Vec<Case>,
},
Echo {
echo: Span,
values: Vec<Expression>,
ending: Ending,
},
Expression {
expression: Expression,
ending: Ending,
},
Return {
return: Span,
value: Option<Expression>,
ending: Ending,
},
Namespace(Namespace),
Use {
uses: Vec<Use>,
kind: UseKind,
},
GroupUse {
prefix: SimpleIdentifier,
kind: UseKind,
uses: Vec<Use>,
},
Comment(Comment),
Try(TryBlock),
UnitEnum(UnitEnum),
BackedEnum(BackedEnum),
Block(Braced<Vec<Statement>>),
Global {
span: Span,
variables: Vec<Variable>,
},
Declare(Declare),
Noop(Span),
}
Variants§
FullOpeningTag(Span)
ShortOpeningTag(Span)
EchoOpeningTag(Span)
ClosingTag(Span)
InlineHtml(ByteString)
GotoLabel(GotoLabel)
Goto(GotoStatement)
HaltCompiler
Fields
§
content: Option<ByteString>
Static
DoWhile(DoWhileStatement)
While(WhileStatement)
For(ForStatement)
Foreach(ForeachStatement)
Break(BreakStatement)
Continue(ContinueStatement)
Constant(Constant)
Function(Function)
Class(Class)
Trait(Trait)
Interface(Interface)
If(IfStatement)
Switch
Echo
Expression
Return
Namespace(Namespace)
Use
GroupUse
Comment(Comment)
Try(TryBlock)
UnitEnum(UnitEnum)
BackedEnum(BackedEnum)
Block(Braced<Vec<Statement>>)
Global
Declare(Declare)
Noop(Span)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Statement
impl<'de> Deserialize<'de> for Statement
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for Statement
impl JsonSchema for Statement
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read more