class Tag
Identity provider for Cells and Builtins.
Tags are one of:
- 'blank' ([?], to be auto-assigned by the Copilot)
- literal ([1])
- virtual ([str], won't be tracked)
- cloned ([X.Y], obtained by cloning Y with parent X)
index
members
-
tag\last()
– obtain the registered value of the last eval-cycle. -
tag\clone(parent)
– create a copy of this tag scoped to a parent tag. -
tag\ident()
– get a globally-unique identifier for this tag
static functions
-
Tag.parse(num)
– parse a Tag (for Lpeg parsing).
internals for `registry`
-
tag\index()
– get a unique index value for this Tag. -
tag\set(value)
– callback to set value for blank tags. -
tag.registry
– the Registry associated with this Tag -
tag.pending
– whether this Tag is newly assigned this tick
details
members
-
– obtain the registered value of the last eval-cycle.
Obtain the value that was previously registered for this tag on the last eval-cylce.
returns:
- (optional any)
-
– create a copy of this tag scoped to a parent tag.
Will mark blank tags for auto-assignment at the end of the eval cycle.
parameters:
- the parent tag
returns:
- (Tag): the cloned tag
-
– get a globally-unique identifier for this tag
prepends the module name to the tag string
returns:
- (string): a unique string
static functions
- – parse a Tag (for Lpeg parsing).
internals for `registry`
-
– get a unique index value for this Tag.
The index is equal to value for simple tags and a path-like string for cloned tags.
returns:
- (number or string)
-
– callback to set value for blank tags.
value may be blank to reassign duplicate tags.
parameters:
-
– the Registry associated with this Tag
-
– whether this Tag is newly assigned this tick