aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-21 14:43:49 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-21 14:44:26 -0700
commitae4670bd8e0e45985e43402f246e4219cd29fcaa (patch)
tree0c043c6b8aed0ebb7acf77b0817fe4ffd193cb38 /lib
parent6728587dfc6a5f4090f2673113ffedb2be924daf (diff)
Improvements working towards better inline tests. Improved handling of
file spoofing and adding -e command line flag for executing a string.
Diffstat (limited to 'lib')
-rw-r--r--lib/os.nom12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/os.nom b/lib/os.nom
index a797d2b..1f8d6a7 100644
--- a/lib/os.nom
+++ b/lib/os.nom
@@ -5,7 +5,7 @@
use "core"
action [path of Nomsu file %filename]:
- lua> "for i,f in files.walk(\%filename) do return f end"
+ lua> "for i,f in Files.walk(\%filename) do return f end"
barf "Could not find file: \%filename"
action [sh> %cmd]:
@@ -15,10 +15,10 @@ action [sh> %cmd]:
result:close()
return contents
-action [read file %filename] (=lua "files.read(\%filename)")
+action [read file %filename] (=lua "Files.read(\%filename)")
compile [for file %f in %path %body] to (..)
Lua ".."
- for i,\(%f as lua expr) in files.walk(\(%path as lua expr)) do
+ for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
\(%body as lua statements)
\(compile as (===next %f ===))
end
@@ -28,7 +28,7 @@ compile [%expr for file %f in %path] to (..)
Lua value ".."
(function()
local ret = list{}
- for i,\(%f as lua expr) in files.walk(\(%path as lua expr)) do
+ for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
ret[#ret+1] = \(%expr as lua statements)
end
return ret
@@ -43,5 +43,5 @@ action [..]
file:write(\%text)
file:close()
-action [line number of %pos in %str] (=lua "files.get_line_number(\%str, \%pos)")
-action [line %line_num in %str] (=lua "files.get_line(\%str, \%line_num)") \ No newline at end of file
+action [line number of %pos in %str] (=lua "Files.get_line_number(\%str, \%pos)")
+action [line %line_num in %str] (=lua "Files.get_line(\%str, \%line_num)")