Improve implementation of LS.getclass and LS.classname, make it more consistent.

This commit is contained in:
2024-09-18 16:09:05 -04:00
parent 2913f2bac2
commit 14b5c4ed8f
9 changed files with 96 additions and 104 deletions

View File

@@ -15,15 +15,13 @@
// a table and stores it in the global environment. The new table is meant to be
// used as a class. Three fields are initially created:
//
// __class --> the name of the class as a string
//
// __index --> points back to the class. Makes it convenient to use the
// class as a metatable.
//
// action --> a subtable of additional methods.
//
// If you invoke 'makeclass' on a class that already exists, the existing table
// is "repaired" - the __class and __index fields are restored and the action
// is "repaired" - __index field is restored and the action
// subtable, if not present, is recreated. If there are already functions or
// constants inside the class, they are not affected.
//