aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-12-30 23:58:47 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-12-30 23:58:47 -0800
commit5059c081ac624ede925d5256885509ddd17181c6 (patch)
tree0457d135e5193126bf73466bfaae09df94ab8a7d /lib
parentec69ee6f62016a2edcc13e3183cbe4cadd75717f (diff)
Auto-upgraded code.
Diffstat (limited to 'lib')
-rw-r--r--lib/file_hash.nom2
-rw-r--r--lib/object.nom2
-rw-r--r--lib/things.nom15
3 files changed, 13 insertions, 6 deletions
diff --git a/lib/file_hash.nom b/lib/file_hash.nom
index a45b684..67b4569 100644
--- a/lib/file_hash.nom
+++ b/lib/file_hash.nom
@@ -25,7 +25,7 @@ test:
) != "inf"
assume ((hash "\000") != (hash "\000\000\000\000\000")) or barf
- .."Incorrect hashing of null strings"
+ "Incorrect hashing of null strings"
if $use_sha1:
assume ((hash "hello world") == "Kq5sNclPz7QV2+lfQIuc6R7oRu0=")
diff --git a/lib/object.nom b/lib/object.nom
index 72e1588..0cede18 100644
--- a/lib/object.nom
+++ b/lib/object.nom
@@ -81,7 +81,7 @@ test:
(object $classname extends $parent $class_body) compiles to:
unless ($classname.type == "Action"):
compile error at $classname
- .."Expected this to be an action, not a \$classname.type"
+ "Expected this to be an action, not a \$classname.type"
for $ in $classname:
unless ($ is text):
diff --git a/lib/things.nom b/lib/things.nom
index e10b9eb..cf5a53f 100644
--- a/lib/things.nom
+++ b/lib/things.nom
@@ -106,14 +106,14 @@ externally (a class named $classname with $members ((initialize $it)'s meaning))
barf "Cannot set \$key, it's not one of the allowed member fields."
set $class's metatable to {
- .__tostring = ($class -> $class.__type), .__call = (
+ .__tostring = ($class -> $class.__type)
+ .__call =
for ($class with $initial_values):
if ($initial_values == (nil)): return $class
set $initial_values's metatable to $class
if $initial_values.set_up:
$initial_values, set up
return $initial_values
- )
}
if ((initialize)'s meaning):
@@ -136,8 +136,15 @@ externally (a class named $classname with $members ((initialize $it)'s meaning))
return
Lua ("
- \$class_id = a_class_named_1_with(\(quote $classname.stub), \($members as lua)\((Lua ", function(\$class_id)\n \$body_lua\nend") if $class_body else "")\
- ..)
+ \$class_id = a_class_named_1_with(\(quote $classname.stub), \($members as lua)\(
+ (
+ Lua ("
+ , function(\$class_id)
+ \$body_lua
+ end
+ ")
+ ) if $class_body else ""
+ ))
a_\$class_id = function(initial_values) return \($classname.stub, as lua id)(initial_values \
..or {}) end
an_\$class_id, a_\($class_id)_with, an_\($class_id)_with = a_\$class_id, a_\$class_id, a_\$class_id