-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtype_struct.go
More file actions
36 lines (30 loc) · 685 Bytes
/
Copy pathtype_struct.go
File metadata and controls
36 lines (30 loc) · 685 Bytes
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
33
34
35
36
package parco
type (
StructType[T any] struct {
ParserType[T]
CompilerType[T]
}
)
func (s StructType[T]) ByteLength() int {
panic("not implemented")
}
func Struct[T any](b ModelBuilder[T]) StructType[T] {
parser, compiler := b.Parco()
return StructParco[T](parser, compiler)
}
func StructPar[T any](parser ParserType[T]) StructType[T] {
return StructType[T]{
ParserType: parser,
}
}
func StructCo[T any](compiler CompilerType[T]) StructType[T] {
return StructType[T]{
CompilerType: compiler,
}
}
func StructParco[T any](parser ParserType[T], compiler CompilerType[T]) StructType[T] {
return StructType[T]{
ParserType: parser,
CompilerType: compiler,
}
}