diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-14 19:17:09 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-14 19:17:16 -0700 |
| commit | e22c35681f90740b4f5006c30b3f154ebd1f8ea2 (patch) | |
| tree | c7f04d968bade120ebf75cfa0b9f073602917122 /lib/object.nom | |
| parent | 7112af7cb6ee52f4ef9664db9c03db52d8c73ac9 (diff) | |
Auto-upgraded everything.
Diffstat (limited to 'lib/object.nom')
| -rw-r--r-- | lib/object.nom | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/object.nom b/lib/object.nom index 1645a28..88b9d1e 100644 --- a/lib/object.nom +++ b/lib/object.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.8.7.6 +#!/usr/bin/env nomsu -V4.8.8.6 # This file contains the implementation of an Object-Oriented programming system. @@ -43,8 +43,8 @@ test: with {%d:new Dog {barks:2}}: assume ((%d::bark) == "Bark! Bark!") compile [my action %actions %body] to: - lua> ".." - local fn_name = \%actions[1].stub:as_lua_id() + lua> "\ + ..local fn_name = \%actions[1].stub:as_lua_id() local \%args = table.map(\%actions[1]:get_args(), function(a) return tostring(nomsu:compile(a)) end) table.insert(\%args, \(\%me as lua id)) local lua = LuaCode(tree.source, "class.", fn_name, " = ", \(..) @@ -66,12 +66,12 @@ compile [my action %actions %body] to: lua:append(")\\nend") end end - return lua + return lua" compile [object %classname extends %parent %class_body] to: return (..) - Lua ".." - do + Lua "\ + ..do local class = {name=\(%classname as lua expr)} setmetatable(class, { __index=\(%parent as lua expr), @@ -106,7 +106,7 @@ compile [object %classname extends %parent %class_body] to: for stub,metamethod in pairs(metamethod_map) do class[metamethod] = class[stub:as_lua_id()] end - end + end" parse [object %classname %class_body] as (..) object %classname extends (nil) %class_body |
