Pattern matching works now
This commit is contained in:
@@ -6,13 +6,13 @@ use orchid_base::interner::Tok;
|
||||
use orchid_base::name::Sym;
|
||||
use orchid_extension::atom::Atomic;
|
||||
use orchid_extension::atom_owned::{OwnedAtom, OwnedVariant};
|
||||
use orchid_extension::context::i;
|
||||
|
||||
use crate::macros::mactree::MacTreeSeq;
|
||||
use crate::macros::rule::matcher::Matcher;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MacroData {
|
||||
pub canonical_name: Sym,
|
||||
pub module: Sym,
|
||||
pub prio: Option<u64>,
|
||||
pub rules: Vec<Rule>,
|
||||
@@ -20,11 +20,6 @@ pub struct MacroData {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Macro(pub Rc<MacroData>);
|
||||
impl Macro {
|
||||
pub async fn canonical_name(&self) -> Sym {
|
||||
self.0.module.suffix([self.0.rules[0].body_name.clone()], &i()).await
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Rule {
|
||||
|
||||
Reference in New Issue
Block a user