From a387fd86a870bd1a34f206ec89c32d9d5c4d1c77 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 31 Jan 2018 15:31:06 -0800 Subject: Added colons for aesthetics. --- lib/text.nom | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/text.nom') diff --git a/lib/text.nom b/lib/text.nom index cd424b9..2a111fe 100644 --- a/lib/text.nom +++ b/lib/text.nom @@ -5,18 +5,18 @@ use "lib/metaprogramming.nom" # Text functions -action [%texts joined with %glue] +action [%texts joined with %glue]: lua> ".." local text_bits = {} for i,bit in ipairs(\%texts) do text_bits[i] = stringify(bit) end return table.concat(text_bits, \%glue) parse [joined %texts, %texts joined] as: %texts joined with "" -compile [capitalized %text, %text capitalized] to - {expr:"((\(%text as lua expr)):gsub('%l', string.upper, 1))"} +compile [capitalized %text, %text capitalized] to {..} + expr:"((\(%text as lua expr)):gsub('%l', string.upper, 1))" -compile [%text with %sub instead of %patt, %text s/%patt/%sub] to - {expr:"((\(%text as lua expr)):gsub(\(%patt as lua expr), \(%sub as lua expr)))"} +compile [%text with %sub instead of %patt, %text s/%patt/%sub] to {..} + expr:"((\(%text as lua expr)):gsub(\(%patt as lua expr), \(%sub as lua expr)))" # TODO: figure out whether indent/dedent should affect first line compile [indented %text, %text indented] to {expr:"((\%text):gsub('\\n','\\n'..(' ')))"} -- cgit v1.2.3