Pattern matching works now

This commit is contained in:
2025-11-27 22:47:02 +01:00
parent 4f989271c5
commit ecf151158d
22 changed files with 146 additions and 150 deletions

View File

@@ -18,7 +18,7 @@ use crate::macros::macro_lib::gen_macro_lib;
use crate::macros::macro_line::MacroLine;
use crate::macros::macro_value::Macro;
use crate::macros::mactree_lexer::MacTreeLexer;
use crate::macros::match_macros::gen_match_macro_lib;
use crate::macros::match_macros::{MatcherAtom, gen_match_macro_lib};
use crate::macros::ph_lexer::{PhAtom, PhLexer};
use crate::macros::std_macros::gen_std_macro_lib;
use crate::macros::utils::MacroBodyArgCollector;
@@ -43,6 +43,7 @@ impl SystemCard for MacroSystem {
Some(Macro::dynfo()),
Some(PhAtom::dynfo()),
Some(MacroBodyArgCollector::dynfo()),
Some(MatcherAtom::dynfo()),
]
}
}
@@ -53,7 +54,13 @@ impl System for MacroSystem {
sym!(macros::common::+; i()),
sym!(macros::common::*; i()),
sym!(macros::common::,; i()),
sym!(macros::common::;; i()),
sym!(macros::common::..; i()),
sym!(macros::common::_; i()),
sym!(std::tuple::t; i()),
sym!(pattern::match; i()),
sym!(pattern::ref; i()),
sym!(pattern::=>; i()),
]
}
fn lexers() -> Vec<LexerObj> { vec![&MacTreeLexer, &PhLexer] }