add new and init to toolchain
This commit is contained in:
@@ -1416,11 +1416,13 @@ load :: proc(
|
||||
allocator := context.allocator,
|
||||
c_options := cimport.Options{},
|
||||
selected := target.DEFAULT,
|
||||
project_root_path := "",
|
||||
) -> (ast.Module, bool) {
|
||||
module := ast.init_module(allocator)
|
||||
project_root, project_root_ok := filepath.abs(".", allocator)
|
||||
project_root_source := project_root_path if len(project_root_path) > 0 else root_path
|
||||
project_root, project_root_ok := filepath.abs(project_root_source, allocator)
|
||||
if !project_root_ok {
|
||||
project_root = strings.clone(".", allocator)
|
||||
project_root = strings.clone(project_root_source, allocator)
|
||||
}
|
||||
state := State{
|
||||
module=&module,
|
||||
|
||||
Reference in New Issue
Block a user