Change the interfaces in typeInfo to allow for slice type to be naturally supported (this PR does not itself add support for slices).
This PR adds Input and Output interfaces to the typeinfo package. These break up the existing Member into more natural separate parts. A new interface ValueLocator replaces the Member interface (since slice ranges are not "members" of anything).
The typeinfo.Info interface is replaced with a private arg interface. The Info type was previously used to generate the Member values. It has been replaced with a struct, ArgInfo which can be generated by typeinfo.GenerateArgInfo(...). This ArgInfo acts as a black box containing type information which can be requested by the expr package via new methods on it.
The testing for typetnfo has been completely redone. The old tests have been removed and new, more complete, tests added. The error messages have not been changed in this PR where avoidable.
Change the interfaces in typeInfo to allow for slice type to be naturally supported (this PR does not itself add support for slices).
This PR adds
Input
andOutput
interfaces to thetypeinfo
package. These break up the existingMember
into more natural separate parts. A new interfaceValueLocator
replaces theMember
interface (since slice ranges are not "members" of anything).The
typeinfo.Info
interface is replaced with a privatearg
interface. TheInfo
type was previously used to generate theMember
values. It has been replaced with a struct,ArgInfo
which can be generated bytypeinfo.GenerateArgInfo(...)
. ThisArgInfo
acts as a black box containing type information which can be requested by theexpr
package via new methods on it.The testing for
typetnfo
has been completely redone. The old tests have been removed and new, more complete, tests added. The error messages have not been changed in this PR where avoidable.