tiger_lib::scopes

Function scope_iterator

Source
pub fn scope_iterator(
    name: &Token,
    data: &Everything,
    sc: &mut ScopeContext,
) -> Option<(Scopes, Scopes)>
Expand description

Look up an iterator, which is a script element that executes its block multiple times, once for each applicable scope value. Iterators may be builtin (the usual case) or may be scripted lists.

name is the name of the iterator, without its any_, every_, random_ or ordered_ prefix. sc is a ScopeContext, only used for validating scripted lists.

Returns a pair of Scopes. The first is the scope types this token can accept as input, and the second is the scope types it may return. The first will be Scopes::None if it needs no input.