From b43432e647fbb3bb76aa2836e3899d5e407c50f9 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 26 Sep 2018 13:05:28 -0700 Subject: Fixed all syntax errors, got original (non-nomnom) tests passing. --- lib/object.nom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/object.nom b/lib/object.nom index 65da2a1..25ff644 100644 --- a/lib/object.nom +++ b/lib/object.nom @@ -80,9 +80,9 @@ compile [object %classname extends %parent %class_body] to: Lua "\ ..do local class = {name=\(quote %classname.stub)} + class.__type = class.name setmetatable(class, { __index=\(%parent as lua expr), - __type=class.name, __tostring=function(cls) return cls.name end, __call=function(cls, inst) inst = setmetatable(inst or {}, cls) -- cgit v1.2.3