-
Notifications
You must be signed in to change notification settings - Fork 207
/
signature.go
32 lines (28 loc) · 1009 Bytes
/
signature.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ================================================================
// Signatures for user-defined functions and user-defined subroutines
// ("UDFs" and "UDSs").
// ================================================================
package cst
import (
"github.com/johnkerl/miller/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,
}
}