@informalsystems/quint
Version:
Core tool for the Quint specification language
25 lines (24 loc) • 997 B
TypeScript
import { ArrowEffect, ConcreteEffect, Effect, EffectVariable } from './base';
/**
* Interface to be implemented by visitor classes.
* Optionally defines functions for each Effect component.
*/
export interface EffectVisitor {
/** General components */
enterConcrete?: (_effect: ConcreteEffect) => void;
exitConcrete?: (_effect: ConcreteEffect) => void;
enterArrow?: (_effect: ArrowEffect) => void;
exitArrow?: (_effect: ArrowEffect) => void;
enterVariable?: (_effect: EffectVariable) => void;
exitVariable?: (_effect: EffectVariable) => void;
}
/**
* Navigates an Effect with a visitor, invoking the correspondent function for each
* found Effect.
*
* @param visitor: the EffectVisitor instance with the functions to be invoked
* @param effect: the effect to be navigated
*
* @returns nothing, any collected information has to be a state inside the EffectVisitor instance.
*/
export declare function walkEffect(visitor: EffectVisitor, effect: Effect): void;