From ae4670bd8e0e45985e43402f246e4219cd29fcaa Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 21 Jul 2018 14:43:49 -0700 Subject: Improvements working towards better inline tests. Improved handling of file spoofing and adding -e command line flag for executing a string. --- core/text.nom | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/text.nom') diff --git a/core/text.nom b/core/text.nom index 641db14..40e0451 100644 --- a/core/text.nom +++ b/core/text.nom @@ -53,6 +53,10 @@ compile [%text matches %pattern] to (..) Lua value ".." (\(%text as lua expr):match(\(%pattern as lua expr)) and true or false) +compile [%text matching %pattern] to (..) + Lua value ".." + \(%text as lua expr):match(\(%pattern as lua expr)) + # Text literals lua> ".." @@ -68,4 +72,4 @@ lua> ".." return LuaCode.Value(tree.source, lua) end end - end \ No newline at end of file + end -- cgit v1.2.3