From d13bcde2b9306e0c87b055faed88da76bd3ff41e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 13 Oct 2017 16:16:07 -0700 Subject: Renamed repr_if_not_string to "stringify" and added nomsu:stringify for convenience. --- lib/utils.nom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/utils.nom') diff --git a/lib/utils.nom b/lib/utils.nom index 55df1b7..f0a7342 100644 --- a/lib/utils.nom +++ b/lib/utils.nom @@ -15,7 +15,7 @@ parse [assert %condition] as: assert %condition (nil) rule [join %strs with glue %glue] =: lua block ".." |local str_bits = {} - |for i,bit in ipairs(vars.strs) do str_bits[i] = nomsu.utils.repr_if_not_string(bit) end + |for i,bit in ipairs(vars.strs) do str_bits[i] = nomsu:stringify(bit) end |return table.concat(str_bits, vars.glue) parse [join %strs] as: join %strs with glue "" @@ -23,7 +23,7 @@ compile [capitalize %str, %str capitalized] to: "(\(%str as lua)):gsub('%l', string.upper, 1)" compile [say %str] to: ".." - |nomsu:writeln(nomsu.utils.repr_if_not_string(\(%str as lua))) + |nomsu:writeln(nomsu:stringify(\(%str as lua))) # Number ranges compile [%start to %stop by %step, %start to %stop via %step] to: ".." -- cgit v1.2.3