From a018b85e7f3a354194b993998fab131daf75e07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Avic=20Simmons?= Date: Mon, 29 Jun 2026 04:15:27 -0400 Subject: [PATCH] fix: fix 3 typos and code bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - utils.lua: "Delcaration" → "Declaration" - interpreter.lua: "nill" → "nil" (undefined variable in comparison) - assignment.lua: "this.data" → "self.data" (wrong variable name; `self` is used consistently throughout the file, `this` was likely a JavaScript habit — would crash at runtime as `this` is nil in Lua) --- src/assignment.lua | 2 +- src/interpreter.lua | 2 +- src/lib/utils.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assignment.lua b/src/assignment.lua index c14f020..7173605 100644 --- a/src/assignment.lua +++ b/src/assignment.lua @@ -60,7 +60,7 @@ function Assignment:getParams() end function Assignment:del(name) - this.data[name] = nil + self.data[name] = nil end function Assignment:toString() diff --git a/src/interpreter.lua b/src/interpreter.lua index b590ca7..c751a41 100644 --- a/src/interpreter.lua +++ b/src/interpreter.lua @@ -72,7 +72,7 @@ end function Interpreter:hasOverride(name) local overrides = self:getOverrides() - return overrides ~= nill and overrides[name] ~= nil + return overrides ~= nil and overrides[name] ~= nil end function Interpreter:evaluate(planoutCode) diff --git a/src/lib/utils.lua b/src/lib/utils.lua index 717a36f..cfc6a6d 100644 --- a/src/lib/utils.lua +++ b/src/lib/utils.lua @@ -33,7 +33,7 @@ local round = function(num, idp) end local deepcopy --- Delcaration must be separated from definition because it is recursive +-- Declaration must be separated from definition because it is recursive deepcopy = function(orig) local copy local status, err = pcall(function()