diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-31 15:31:06 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-31 15:31:13 -0800 |
| commit | a387fd86a870bd1a34f206ec89c32d9d5c4d1c77 (patch) | |
| tree | aedb8d409cabefb1680f581067ea3000f8085189 /lib/text.nom | |
| parent | b1406a3203901392b98df431157e04f9a9164ff2 (diff) | |
Added colons for aesthetics.
Diffstat (limited to 'lib/text.nom')
| -rw-r--r-- | lib/text.nom | 10 |
1 files changed, 5 insertions, 5 deletions
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'..(' ')))"} |
