stagePlanner.go
func planStages(tokens []ExpressionToken) (*evaluationStage, error) {

	stream := newTokenStream(tokens)

	stage, err := planTokens(stream)
	if err != nil {
		return nil, err
	}

	// while we're now fully-planned, we now need to re-order same-precedence operators.
	// this could probably be avoided with a different planning method
	reorderStages(stage)

	stage = elideLiterals(stage)
	return stage, nil
}
func planStages(tokens []ExpressionToken) (*evaluationStage, error) {

	stream := newTokenStream(tokens)

	stage, err := planTokens(stream)
	if err != nil {
		return nil, err
	}

	// while we're now fully-planned, we now need to re-order same-precedence operators.
	// this could probably be avoided with a different planning method
	reorderStages(stage)

	stage = elideLiterals(stage)
	return stage, nil
}
func planStages ( tokens [ ] ExpressionToken ) ( * evaluationStage , error ) { stream := newTokenStream ( tokens ) stage , err := planTokens ( stream ) if err != nil { return nil , err } // while we're now fully-planned, we now need to re-order same-precedence operators. // this could probably be avoided with a different planning method reorderStages ( stage ) stage = elideLiterals ( stage ) return stage , nil }
/*
	Creates a `evaluationStageList` object which represents an execution plan (or tree)
	which is used to completely evaluate a set of tokens at evaluation-time.
	The three stages of evaluation can be thought of as parsing strings to tokens, then tokens to a stage list, then evaluation with parameters.
*/
/ * Creates a evaluationStageList object which represents an execution plan ( or tree ) which is used to completely evaluate a set of tokens at evaluation - time . The three stages of evaluation can be thought of as parsing strings to tokens then tokens to a stage list then evaluation with parameters .