-
Notifications
You must be signed in to change notification settings - Fork 4
Syntax Reference
Maurits edited this page Oct 20, 2018
·
5 revisions
By default, SIMPLOO exposes the following functions and variables as globals.
They may look confusing when not used in context, please refer to the general usage articles on the wiki to see how they are used.
-- Parsed into nil value when assigned to a class member, because you can't assign a nil value in a table and preserve the key otherwise.
-- Use this to instantiate members with a nil value. The string is random in order to avoid accidental collisions with actual strings.
null = "NullVariable_WgVtlrvpP194T7wUWDWv2mjB"
-- Called separately or in combination with extends.
class(className, classOperation)
-- ..
extends(parents)
-- ..
namespace(namespaceName)
-- ..
using(namespaceName)
-- ..
as(newPath)
The configuration variable Expose Syntax (enabled by default) controls whether these functions are exposed or not. When this configuration option is disabled, the functions are available under the global simploo.syntax table.
You can also manually enable or disable the simploo syntax globals in sections of your code by calling simploo.syntax.init() and simploo.syntax.destroy().