split Function and OpenFunction
This commit is contained in:
parent
995122f1e0
commit
1325b1cf08
|
|
@ -2,6 +2,9 @@ use std::cell::RefCell;
|
||||||
|
|
||||||
use crate::ast;
|
use crate::ast;
|
||||||
|
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct OpenFunction(Function);
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Function {
|
pub struct Function {
|
||||||
name: Option<ast::Ident>,
|
name: Option<ast::Ident>,
|
||||||
|
|
@ -234,6 +237,6 @@ fn build_function(parent: &BuildContext<'_>, code: &ast::Function) -> Function {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(code: &ast::Function) -> Function {
|
pub fn build(code: &ast::Function) -> OpenFunction {
|
||||||
build_function(&BuildContext::new_toplevel(), &code)
|
OpenFunction(build_function(&BuildContext::new_toplevel(), &code))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user