class Tag
Identity provider for Cells and Builtins.
Tags are one of:
- ‘blank’ ([?]
, to be auto-assigned by the Copilot)
- literal ([1]
)
- cloned ([X.Y]
, obtained by cloning Y with parent X)
index
members
-
tag:last()
– obtain the registered value of the last eval-cycle. -
tag:register(expr)
– registerexpr
for this tag for the current eval cycle. -
tag:clone(parent)
– create a copy of this tag scoped to aparent
tag.
static functions
-
Tag.blank()
– create a blank Tag. -
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.
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)
-
– register
expr
for this tag for the current eval cycle.Will mark blank tags for auto-assignment at the end of the eval cycle.parameters:
- the value to register
-
– 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
static functions
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: