aboutsummaryrefslogtreecommitdiff
path: root/lib/os.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 14:36:15 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 14:37:22 -0800
commit7d2b7199d87930096b7fd799709fe0105d51eccb (patch)
treef33de61cb44357497758bb08ec6993753d8baa43 /lib/os.nom
parentba96cdfa07cea15ada62f8f89b2563de1286a0de (diff)
Lots of cleanups, including expanded use of (... compiles to "text
literal") shorthand, deprecating Lua value, and more use of Lua "..." with text interpolations.
Diffstat (limited to 'lib/os.nom')
-rw-r--r--lib/os.nom30
1 files changed, 14 insertions, 16 deletions
diff --git a/lib/os.nom b/lib/os.nom
index 2da395c..64b46c2 100644
--- a/lib/os.nom
+++ b/lib/os.nom
@@ -21,23 +21,21 @@ externally (read file %filename) means (=lua "Files.read(\%filename)")
test:
for file %f in "core": do nothing
-(for file %f in %path %body) compiles to (..)
- Lua "\
- ..for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
- \(%body as lua statements)
- \(what (===next %f ===) compiles to)
- end
- \(what (===stop %f ===) compiles to)"
+(for file %f in %path %body) compiles to "\
+ ..for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
+ \(%body as lua statements)
+ \(what (===next %f ===) compiles to)
+ end
+ \(what (===stop %f ===) compiles to)"
-(%expr for file %f in %path) compiles to (..)
- Lua value "\
- ..(function()
- local ret = List{}
- for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
- ret[#ret+1] = \(%expr as lua statements)
- end
- return ret
- end)()"
+(%expr for file %f in %path) compiles to "\
+ ..(function()
+ local ret = List{}
+ for i,\(%f as lua expr) in Files.walk(\(%path as lua expr)) do
+ ret[#ret+1] = \(%expr as lua statements)
+ end
+ return ret
+ end)()"
externally [..]
write to file %filename %text, to file %filename write %text