aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-11 01:09:26 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-11 01:09:26 -0800
commit6f4b67632a544780438110bb11e5122448e24881 (patch)
tree3549eb211df19ff6870d5cf63ad1c25d1880040b /lib
parentc0333ca31532f14ec8ebd841a5f68b2f35e9cc80 (diff)
Renamed String -> Text
Diffstat (limited to 'lib')
-rw-r--r--lib/operators.nom2
-rw-r--r--lib/utils.nom4
-rw-r--r--lib/utils2.nom4
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