initial parser signature

This commit is contained in:
Anand Balakrishnan 2023-09-29 13:09:04 -07:00
parent cc423a0bec
commit b2e56594b0
No known key found for this signature in database
3 changed files with 26 additions and 5 deletions

View file

@ -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