mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
* Update package version * Update makefile targets * Update readme packages * Remaining old packages via rg/sd
32 lines
1,012 B
Go
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,
|
|
}
|
|
}
|