func (this *table) allocIfStates(expr *ast.StateExpr) { if expr.State != nil { this.allocState(expr.GetState()) return } this.allocIfStates(expr.GetIfExpr().GetThenClause()) this.allocIfStates(expr.GetIfExpr().GetElseClause()) }
func compile(stateExpr *ast.StateExpr, nameToState NameToState, c Catcher) (StateExpr, error) { if stateExpr.State != nil { state, err := nameToState.NameToState(stateExpr.GetState()) if err != nil { return nil, err } return &constState{state}, nil } return Compile(stateExpr.GetIfExpr(), nameToState, c) }