aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-20 14:52:59 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-20 14:54:40 -0800
commit2bbc035f5dcc3ecd62724b9d1de0e7e3ea902379 (patch)
tree34a83497f7570946b6252183b3e8fe0ce2010595 /core
parentf30413853063483147d941ffccc4b663b71bc943 (diff)
Simplifying the filesystem code (no longer entangled with nomsupath) and
using that to simplify the tools. Now the tools directly take lists of file paths rather than things that might go through nomsupath or directories or get processed by filetype. Use your shell for globbing stuff like `nomsu tools/test.nom core/*.nom`
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom15
1 files changed, 0 insertions, 15 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index c89b1df..67219ac 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -338,21 +338,6 @@ externally (match %tree with %patt) means:
end
return matches"
-externally (%tree with %patt ~> %replacement) means:
- lua> "\
- ..return \%tree:map(function(\%t)
- local \%vars = \(match %t with %patt)
- if not \%vars then return nil end
- for \%k,\%v in pairs(\%vars) do
- \%vars[\%k] = \(%v with %patt ~> %replacement)
- end
- return \%replacement:map(function(\%t)
- if \%t.type == "Var" then
- return \%vars[\%t[1]]
- end
- end)
- end)"
-
test:
assume ((quote "one\n\"two\"") == "\"one\\n\\\"two\\\"\"")