aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-26 15:52:38 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-26 15:53:00 -0700
commit65dc1f2196b46dbd527d49da113515bea825416d (patch)
tree02dbbe6528dc9c4a1e71a522da624a08f1179d64 /lib
parent42578872c72ec46b256a093f74482fb6e5b8e4b9 (diff)
Cleaning up metaprogramming a bit and fixing/adding test for recursion
control flow.
Diffstat (limited to 'lib')
-rw-r--r--lib/os.nom5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/os.nom b/lib/os.nom
index 8a27168..25b47b6 100644
--- a/lib/os.nom
+++ b/lib/os.nom
@@ -29,3 +29,8 @@ action [write to file %filename %text, to file %filename write %text]
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)"