tiger_lib::scopes

Function scope_prefix

Source
pub fn scope_prefix(prefix: &Token) -> Option<(Scopes, Scopes, ArgumentValue)>
Expand description

Look up a prefixed token that is used to look up items in the game database.

For example, character:alexander_the_great to fetch that character as a scope value.

Some prefixes have an input scope, and they look up something related to the input scope value.

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