Skip to content

Commit

Permalink
Narrow the required state visibility of the stringer.
Browse files Browse the repository at this point in the history
  • Loading branch information
corywalker committed Oct 26, 2018
1 parent 671ca5d commit a8cb473
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/expreduceapi/cas.go
Expand Up @@ -7,14 +7,19 @@ import (
gologging "github.com/op/go-logging"
)

type evalStateForStringer interface {
GetStringFn(headStr string) (ToStringFnType, bool)
// Used by Definition[]
GetDefined(name string) (Def, bool)
}

type ToStringFnType (func(ExpressionInterface, ToStringParams) (bool, string))
type ToStringParams struct {
Form string
Context StringInterface
ContextPath ExpressionInterface
PreviousHead string
// Used by Definition[]
Esi EvalStateInterface
Esi evalStateForStringer
}

// Ex is the interface that fundamental types must implement.
Expand Down

0 comments on commit a8cb473

Please sign in to comment.