miller/pkg/dsl/cst/signature.go
Adam Lesperance 085e831668
The package version must match the major tag version (#1654)
* Update package version

* Update makefile targets

* Update readme packages

* Remaining old packages via rg/sd
2024-09-20 12:10:11 -04:00

32 lines
1,012 B
Go

// ================================================================
// Signatures for user-defined functions and user-defined subroutines
// ("UDFs" and "UDSs").
// ================================================================
package cst
import (
"github.com/johnkerl/miller/v6/pkg/types"
)
// ----------------------------------------------------------------
type Signature struct {
funcOrSubrName string
arity int // Computable from len(typeGatedParameterNames) at callee, not at caller
typeGatedParameterNames []*types.TypeGatedMlrvalName
typeGatedReturnValue *types.TypeGatedMlrvalName
}
func NewSignature(
funcOrSubrName string,
arity int,
typeGatedParameterNames []*types.TypeGatedMlrvalName,
typeGatedReturnValue *types.TypeGatedMlrvalName,
) *Signature {
return &Signature{
funcOrSubrName: funcOrSubrName,
arity: arity,
typeGatedParameterNames: typeGatedParameterNames,
typeGatedReturnValue: typeGatedReturnValue,
}
}