Mercerenies / gdlisp

Lisp on the Godot platform
GNU General Public License v3.0
148 stars 1 forks source link

The Object name #106

Closed Mercerenies closed 2 years ago

Mercerenies commented 2 years ago

See #65 for context. Object is complicated, since it doesn't exist at runtime, yet it has a static function new which has variable arguments (#79).

Mercerenies commented 2 years ago

Okay, I was overthinking. Object, as a type, has only one nullary method (not varargs) called new, so we can synthesize it. It also has constants, which I think we'll just turn into global constants on the GDLisp object because why are they on Object to begin with?

Mercerenies commented 2 years ago

See https://github.com/godotengine/godot/issues/41462, we may not be able to support the Object.new syntax since it looks like Godot 3.x (from 3.2 onward) doesn't support it either, due to a parsing bug.

Mercerenies commented 2 years ago

Handled (minus the Object.new issue) in 78efc66