feat: Enhance #use directive for directories and cwd
The `#use` directive now supports referencing entire directories, automatically including all `.myc` files within them. Additionally, environments are now initialized with the current working directory as a default search path, simplifying module resolution.
This commit is contained in:
+2
-2
@@ -42,9 +42,9 @@ struct Cli {
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
let mut env = Environment::new();
|
||||
let mut env = Environment::new().with_cwd();
|
||||
env.optimization = !cli.no_opt;
|
||||
|
||||
|
||||
// Load libraries (Now just search paths)
|
||||
for lib_path in &cli.lib {
|
||||
env.add_search_path(lib_path);
|
||||
|
||||
Reference in New Issue
Block a user