feat: add File.glob for file pattern matching (issue 15)

Add File.glob(pattern) effect operation that returns a list of file
paths matching a glob pattern (e.g., "src/**/*.lux"). Implemented
across interpreter (using glob crate), JS backend (handler-based),
and C backend (using POSIX glob.h).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 10:33:59 -05:00
parent 746643527d
commit f2688072ac
5 changed files with 75 additions and 4 deletions

View File

@@ -964,6 +964,11 @@ impl TypeEnv {
],
return_type: Type::Unit,
},
EffectOpDef {
name: "glob".to_string(),
params: vec![("pattern".to_string(), Type::String)],
return_type: Type::List(Box::new(Type::String)),
},
],
},
);