aboutsummaryrefslogtreecommitdiff
path: root/core/text.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-11 14:13:43 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-11 14:14:16 -0700
commitba2b83d5669f9fcf6f49fcd2adac5997eb07f7d8 (patch)
tree55d0ecaafd6c5c871bd987a28a2b61fca16b250c /core/text.nom
parentb32634faf8eb0fe1448ca44ddf9b3a6bfaf20b68 (diff)
Fixed nomsu codegen for indented text and improved text parsing. Also
moved some more tests inline.
Diffstat (limited to 'core/text.nom')
-rw-r--r--core/text.nom3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/text.nom b/core/text.nom
index 37b8082..d09e6b5 100644
--- a/core/text.nom
+++ b/core/text.nom
@@ -44,6 +44,9 @@ compile [%expr for %match where %text matches %patt] to
return ret
end)()
+compile [%text matches %pattern] to
+ Lua value "(\(%text as lua expr):match(\(%pattern as lua expr)) and true or false)"
+
# Text literals
lua> ".."
do