Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StateTracker ¶
type StateTracker struct {
// contains filtered or unexported fields
}
StateTracker manages the state of variables within different scopes.
func NewStateTracker ¶
func NewStateTracker() *StateTracker
NewStateTracker creates a new state tracker.
func (*StateTracker) EnterScope ¶
func (st *StateTracker) EnterScope()
EnterScope creates a new, nested scope.
func (*StateTracker) GetState ¶
func (st *StateTracker) GetState(obj types.Object) VarState
GetState retrieves the state of a variable, searching from the innermost scope outwards.
func (*StateTracker) LeaveScope ¶
func (st *StateTracker) LeaveScope()
LeaveScope exits the current scope, discarding its state.
func (*StateTracker) SetState ¶
func (st *StateTracker) SetState(obj types.Object, state VarState)
SetState sets the state of a variable in the current scope.
func (*StateTracker) UpdateStateFromCondition ¶
UpdateStateFromCondition intelligently updates variable states based on an if-condition.
Click to show internal directories.
Click to hide internal directories.