Struct solang_parser::pt::VariableDeclaration
source · pub struct VariableDeclaration {
pub loc: Loc,
pub ty: Expression,
pub storage: Option<StorageLocation>,
pub name: Option<Identifier>,
}
Expand description
A variable declaration.
<ty> [storage] <name>
Fields§
§loc: Loc
The code location.
ty: Expression
The type.
storage: Option<StorageLocation>
The optional memory location.
name: Option<Identifier>
The identifier.
This field is None
only if an error occurred during parsing.
Trait Implementations§
source§impl Clone for VariableDeclaration
impl Clone for VariableDeclaration
source§fn clone(&self) -> VariableDeclaration
fn clone(&self) -> VariableDeclaration
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 moresource§impl CodeLocation for VariableDeclaration
impl CodeLocation for VariableDeclaration
source§impl Debug for VariableDeclaration
impl Debug for VariableDeclaration
source§impl Display for VariableDeclaration
impl Display for VariableDeclaration
source§impl PartialEq<VariableDeclaration> for VariableDeclaration
impl PartialEq<VariableDeclaration> for VariableDeclaration
source§fn eq(&self, other: &VariableDeclaration) -> bool
fn eq(&self, other: &VariableDeclaration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.