pub struct VariableDecl {
pub type_info: TypeInfo,
pub name: String,
pub is_static: bool,
pub name_location: SourceLocation,
pub initializer: Option<Expression>,
pub array_size: Option<Expression>,
pub location: SourceLocation,
}Fields§
§type_info: TypeInfo§name: String§is_static: bool§name_location: SourceLocationLocation of the variable name in the source
initializer: Option<Expression>§array_size: Option<Expression>Array size expression for array declarators (e.g., [N_PROPS])
location: SourceLocationImplementations§
Source§impl VariableDecl
impl VariableDecl
Sourcepub fn is_simple_identifier(&self) -> bool
pub fn is_simple_identifier(&self) -> bool
Check if this is a simple identifier (not a field access like obj->field)
Trait Implementations§
Source§impl Clone for VariableDecl
impl Clone for VariableDecl
Source§impl Debug for VariableDecl
impl Debug for VariableDecl
Auto Trait Implementations§
impl Freeze for VariableDecl
impl RefUnwindSafe for VariableDecl
impl Send for VariableDecl
impl Sync for VariableDecl
impl Unpin for VariableDecl
impl UnsafeUnpin for VariableDecl
impl UnwindSafe for VariableDecl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more