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
1 changed files with 11 additions and 1 deletions
|
@ -75,10 +75,20 @@ impl GazType for Literal {
|
|||
#[builder(setter(into))]
|
||||
pub struct Variable {
|
||||
type_: BaseType,
|
||||
quantifer: Quantifier,
|
||||
quantifier: Quantifier,
|
||||
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 {
|
||||
fn to_string(&self) -> String {
|
||||
self.name.clone()
|
||||
|
|
Loading…
Reference in a new issue