Terminal TAST

Scopes and Refs

Scopes are regions in which you can limit a set of Inlines. It allows you to find and deal with Inlines in the same area. Refs allows finding Inline ids under the same Scope. The ref is a human-friendly name that you can give to any Inline to find it later.

Find all of the same Scope

Create an object type Scope and add into its children a TAST with all the inlines that you want to find. The selector getTerminalScopeInlines returns the list of all inlines and its configuration under the same scope.

Use it in your actions to perform changes over those inlines.

Nesting scopes

Because Scope children is a TAST, it can have other children inside. Scopes only references to the current Scope. If more than one Scope is present, the only participant Inlines are the ones inside that Scope and no other one. Two Scopes, one side the other, does not mix their Inlines. In Scope containing other Scope, does not include the Inlines of the children Scope.

Refs

Refs allows finding Inlines inside the same scope by using a human friendly id. Create a Scope and place inside Inlines with specific refs to find them. Use the selector getTerminalInlineRef to find the Inline id of the referenced Inline.