github.com/MontFerret/ferret@v0.18.0/pkg/runtime/expressions/member_path.go (about)

     1  package expressions
     2  
     3  import "github.com/MontFerret/ferret/pkg/runtime/core"
     4  
     5  type MemberPathSegment struct {
     6  	exp      core.Expression
     7  	optional bool
     8  }
     9  
    10  func NewMemberPathSegment(source core.Expression, optional bool) (*MemberPathSegment, error) {
    11  	if source == nil {
    12  		return nil, core.Error(core.ErrMissedArgument, "source")
    13  	}
    14  
    15  	return &MemberPathSegment{source, optional}, nil
    16  }