Ast: add getters for variables
All checks were successful
ci/woodpecker/push/build_rust Pipeline was successful
All checks were successful
ci/woodpecker/push/build_rust Pipeline was successful
This commit is contained in:
parent
59be92491f
commit
a875a78f4b
|
@ -75,10 +75,20 @@ impl GazType for Literal {
|
||||||
#[builder(setter(into))]
|
#[builder(setter(into))]
|
||||||
pub struct Variable {
|
pub struct Variable {
|
||||||
type_: BaseType,
|
type_: BaseType,
|
||||||
quantifer: Quantifier,
|
quantifier: Quantifier,
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Variable {
|
||||||
|
pub fn get_name(&self) -> String {
|
||||||
|
self.name.clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_quantifier(&self) -> Quantifier {
|
||||||
|
self.quantifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ToString for Variable {
|
impl ToString for Variable {
|
||||||
fn to_string(&self) -> String {
|
fn to_string(&self) -> String {
|
||||||
self.name.clone()
|
self.name.clone()
|
||||||
|
|
Loading…
Reference in a new issue