diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/operators.nom | 2 | ||||
| -rw-r--r-- | lib/utils.nom | 4 | ||||
| -rw-r--r-- | lib/utils2.nom | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/operators.nom b/lib/operators.nom index 7eada51..05656ea 100644 --- a/lib/operators.nom +++ b/lib/operators.nom @@ -24,7 +24,7 @@ compile [..] local condition = nomsu:tree_to_lua(\%condition).expr; local when_true = nomsu:tree_to_lua(\%when_true_expr).expr; local when_false = nomsu:tree_to_lua(\%when_false_expr).expr; - local safe = {String=true, List=true, Dict=true, Number=true}; + local safe = {Text=true, List=true, Dict=true, Number=true}; if safe[\%when_true_expr.type] then return "("..condition.." and "..when_true.." or "..when_false..")"; else diff --git a/lib/utils.nom b/lib/utils.nom index 6af38c8..dec2375 100644 --- a/lib/utils.nom +++ b/lib/utils.nom @@ -12,7 +12,7 @@ compile [assert %condition %msg] to code: ".." parse [assert %condition] as: assert %condition (nil) -# String functions +# Text functions rule [join %strs with glue %glue] =: lua do> ".." local str_bits = {} @@ -93,7 +93,7 @@ compile [sort %items by %key_expr] to: ".." return \(%key_expr as lua); end) -# String utilities +# Text utilities compile [nl, newline, line feed, linefeed, lf] to: "'\\n'" compile [tab] to: "'\\t'" compile [bell] to: "'\\a'" diff --git a/lib/utils2.nom b/lib/utils2.nom index 8077203..b0b9dd9 100644 --- a/lib/utils2.nom +++ b/lib/utils2.nom @@ -6,11 +6,11 @@ require "lib/collections.nom" compile [say %str] to: - "nomsu:writeln(\(%str as lua))" if ((%str's "type") == "String") + "nomsu:writeln(\(%str as lua))" if ((%str's "type") == "Text") ..else "nomsu:writeln(nomsu:stringify(\(%str as lua)))" compile [do %action] to code: - (%action as lua statements) if ((%action's "type") == "Thunk") + (%action as lua statements) if ((%action's "type") == "Block") ..else "(\(%action as lua))(nomsu);" # With statement |
