aboutsummaryrefslogtreecommitdiff
path: root/lib/os.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/os.nom')
-rw-r--r--lib/os.nom13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/os.nom b/lib/os.nom
index 8c05836..2e4cd86 100644
--- a/lib/os.nom
+++ b/lib/os.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V6.13.12.8
+#!/usr/bin/env nomsu -V6.14
#
This file defines some actions that interact with the operating system and filesystem.
@@ -33,7 +33,9 @@ externally [
write to file $filename $text, to file $filename write $text
write $text to file $filename
] all mean:
- assume ($filename != "stdin") or barf "Cannot write to stdin"
+ unless ($filename != "stdin"):
+ fail "Cannot write to stdin"
+
lua> ("
local file = io.open(\$filename, 'w')
file:write(\$text)
@@ -45,10 +47,9 @@ externally (source lines of $tree) means:
$file = (read file $source.filename)
return
[
- :
- for $ in ($file, line number at $source.start) to
- $file, line number at $source.stop
- ..: add ($file, line $)
+ : for $ in ($file, line number at $source.start) to
+ $file, line number at $source.stop
+ ..: add ($file, line $)
], joined with "\n"
externally (spoof file $text) means ($Files.spoof $text)