generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
unit.go
24 lines (18 loc) · 802 Bytes
/
unit.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
package schema
import (
"google.golang.org/protobuf/reflect/protoreflect"
schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema"
)
type Unit struct {
Pos Position `parser:"" protobuf:"1,optional"`
Unit bool `parser:"@'Unit'" protobuf:"-"`
}
var _ Type = (*Unit)(nil)
var _ Decl = (*Unit)(nil)
func (u *Unit) Position() Position { return u.Pos }
func (u *Unit) schemaType() {}
func (u *Unit) schemaDecl() {}
func (u *Unit) String() string { return "Unit" }
func (u *Unit) ToProto() protoreflect.ProtoMessage { return &schemapb.Unit{Pos: posToProto(u.Pos)} }
func (u *Unit) schemaChildren() []Node { return nil }
func (u *Unit) GetName() string { return "" }