initial parser signature
This commit is contained in:
parent
cc423a0bec
commit
b2e56594b0
3 changed files with 26 additions and 5 deletions
|
|
@ -1,3 +1,5 @@
|
|||
use std::any::Any;
|
||||
|
||||
use enum_dispatch::enum_dispatch;
|
||||
|
||||
use super::{BoolExpr, ExprRef, NumExpr};
|
||||
|
|
@ -14,6 +16,9 @@ pub trait Expr {
|
|||
/// If the expression doesn't contain arguments (i.e., it is a leaf expression) then
|
||||
/// the vector is empty.
|
||||
fn args(&self) -> Vec<ExprRef<'_>>;
|
||||
|
||||
/// [`std::any::Any`] trampoline for expressions
|
||||
fn as_any(&self) -> &dyn Any;
|
||||
}
|
||||
|
||||
/// Marker trait for numeric expressions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue