diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-13 16:16:07 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-13 16:16:07 -0700 |
| commit | d13bcde2b9306e0c87b055faed88da76bd3ff41e (patch) | |
| tree | 4c9e974d8e448adb6f6c1ba232b4114137aba4cc /lib | |
| parent | 7435b61380054307148ec2c3a6af6d7ef9187fbe (diff) | |
Renamed repr_if_not_string to "stringify" and added nomsu:stringify for
convenience.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.nom | 4 |
1 files changed, 2 insertions, 2 deletions
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: ".." |
