diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 17:56:06 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 17:56:15 -0700 |
| commit | 24b8649c3391e35104a492d8546ce197cbdc5068 (patch) | |
| tree | c9d5476b2c893f14558f2e48847bc779c4bce402 /core | |
| parent | 568e21dc29d72fad3d8b09ec8dd53f845bb93463 (diff) | |
Tweaks to the API for text matching.
Diffstat (limited to 'core')
| -rw-r--r-- | core/metaprogramming.nom | 4 | ||||
| -rw-r--r-- | core/text.nom | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index 028a914..9e51d7d 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -3,7 +3,7 @@ This File contains actions for making actions and compile-time actions and some helper functions to make that easier. -lua> "NOMSU_CORE_VERSION = 4" +lua> "NOMSU_CORE_VERSION = 5" lua> ".." nomsu.COMPILE_ACTIONS["% -> %"] = function(nomsu, tree, \%args, \%body) local lua = LuaCode.Value(tree.source, "function(") @@ -240,4 +240,4 @@ compile [with local compile actions %body] to (..) action [Nomsu version]: use "lib/version.nom" return ".." - \(Nomsu syntax version).\(core version).\(Nomsu compiler version).\(lib version)
\ No newline at end of file + \(Nomsu syntax version).\(core version).\(Nomsu compiler version).\(lib version) diff --git a/core/text.nom b/core/text.nom index 30eab50..dc67ec5 100644 --- a/core/text.nom +++ b/core/text.nom @@ -30,7 +30,7 @@ action [lines in %text, lines of %text] (..) end return result -compile [for %match where %text matches %patt %body] to (..) +compile [for %match in %text matching %patt %body] to (..) Lua ".." for \(%match as lua expr) in \(%text as lua expr):gmatch(\(%patt as lua expr)) do \(%body as lua statements) @@ -38,7 +38,7 @@ compile [for %match where %text matches %patt %body] to (..) end \(compile as (===stop %match ===)) -compile [%expr for %match where %text matches %patt] to (..) +compile [%expr for %match in %text matching %patt] to (..) Lua value ".." (function() local ret = list{} @@ -66,4 +66,4 @@ lua> ".." return LuaCode.Value(tree.source, lua) end end - end
\ No newline at end of file + end |
