aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-09 00:22:12 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-09 00:22:12 -0400
commit13a9304decb86450a2a0e9cc756da4c2d373c929 (patch)
tree0d303738a213c0b34064aa78e7a110689277a0c4 /environment.c
parent711afee405b005223a8eeaa6be6cd367a31307d0 (diff)
Initial working version
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/environment.c b/environment.c
index 3cb47b90..d7f6c6f7 100644
--- a/environment.c
+++ b/environment.c
@@ -248,6 +248,11 @@ env_t *new_compilation_unit(CORD *libname)
{"Pattern", Type(TextType, .lang="Pattern", .env=namespace_env(env, "Pattern")), "Pattern_t", "Pattern$info", TypedArray(ns_entry_t,
{"escape_text", "Pattern$escape_text", "func(text:Text)->Pattern"},
)},
+ {"Path", Type(TextType, .lang="Path", .env=namespace_env(env, "Path")), "Text_t", "Text$info", TypedArray(ns_entry_t,
+ {"escape_text", "Path$escape_text", "func(text:Text)->Path"},
+ {"resolved", "Path$resolved", "func(path:Path, relative_to=./)->Path"},
+ {"relative", "Path$relative", "func(path:Path, relative_to=./)->Path"},
+ )},
{"Shell", Type(TextType, .lang="Shell", .env=namespace_env(env, "Shell")), "Shell_t", "Shell$info", TypedArray(ns_entry_t,
{"escape_text", "Shell$escape_text", "func(text:Text)->Shell"},
{"run", "Shell$run", "func(command:Shell, status=!&Int32?)->Text"},