pub type VarDefine = VarDefine<Undeclared<Value>>;
Aliased Type§
pub struct VarDefine {
pub ty: GroupIdx,
pub name: String,
pub init: Option<Undeclared<AssignValue>>,
pub is_temp: bool,
}
Fields§
§ty: GroupIdx
the type of the variable
name: String
the name of the variable, either a named variable or a temp variable from computing
init: Option<Undeclared<AssignValue>>
the initial value of the variable
[None
] represents the variable is not initialized when it was created
is_temp: bool
a temp value
will only be immediately used once in expressions
this is a hint for code generation backend optimization
code generation backend can directly inline init
only when is_temp
is true