Type Alias VarDefine

Source
pub type VarDefine = VarDefine<Value>;

Aliased Type§

struct VarDefine {
    pub ty: TypeDefine,
    pub name: String,
    pub init: Option<AssignValue>,
    pub is_temp: bool,
}

Fields§

§ty: TypeDefine

the type of the variable

§name: String

the name of the variable, either a named variable or a temp variable from computing

§init: Option<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