Skip to content

fix: fix 3 typos and code bugs#13

Open
Avicennasis wants to merge 1 commit into
Fanatics:masterfrom
Avicennasis:docs/fix-typos
Open

fix: fix 3 typos and code bugs#13
Avicennasis wants to merge 1 commit into
Fanatics:masterfrom
Avicennasis:docs/fix-typos

Conversation

@Avicennasis

Copy link
Copy Markdown

Summary

Fix 1 spelling error and 2 code bugs across 3 Lua files:

  • src/lib/utils.lua: "Delcaration" → "Declaration" (comment typo)
  • src/interpreter.lua: nillnil — compares against undefined variable nill instead of Lua's nil keyword. Functionally equivalent (undefined variables evaluate to nil in Lua) but confusing and incorrect.
  • src/assignment.lua: this.data[name]self.data[name] — the file uses self consistently (21 occurrences); this single this reference is a JavaScript naming habit that would crash at runtime (this is nil in Lua, causing "attempt to index a nil value").

The nill and this fixes are behavioral changes — please review carefully.

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant