From ba2b83d5669f9fcf6f49fcd2adac5997eb07f7d8 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 11 Jul 2018 14:13:43 -0700 Subject: Fixed nomsu codegen for indented text and improved text parsing. Also moved some more tests inline. --- core/text.nom | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/text.nom') 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 -- cgit v1.2.3