knave-expand 0.14.21

The reading, scoping and expansion stages of knave
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::core::Declaration;
use crate::diagnostic::Diagnostic;
use crate::reader::{Form, Symbol};
use crate::source::Span;

pub trait ExpansionCallbacks {
    fn expand_call(&mut self, call: Form) -> Result<Option<Form>, Diagnostic>;
    fn set_macro_step_limit(&mut self, limit: u64);
    fn declare_definition(&mut self, name: Form, declaration: Declaration);
    fn require_module(&mut self, path: &Symbol, span: Span) -> Result<Symbol, Diagnostic>;
}