Lines Matching full:constructor
52 func FromKeywords(constructor starlark.Value, kwargs []starlark.Tuple) *Struct {
53 if constructor == nil {
54 panic("nil constructor")
57 constructor: constructor,
70 // The constructor parameter specifies the constructor; use Default for an ordinary struct.
71 func FromStringDict(constructor starlark.Value, d starlark.StringDict) *Struct {
72 if constructor == nil {
73 panic("nil constructor")
76 constructor: constructor,
89 // A struct has a constructor, a distinct value that identifies a class
95 // The default constructor, Default, is the string "struct", but
97 // The constructor value appears in the printed form of the value,
98 // and is accessible using the Constructor method.
102 constructor starlark.Value member
106 // Default is the default constructor for structs.
135 if s.constructor == Default {
140 buf.WriteString(s.constructor.String())
155 // Constructor returns the constructor used to create this struct.
156 func (s *Struct) Constructor() starlark.Value { return s.constructor } func
187 if eq, err := starlark.Equal(x.constructor, y.constructor); err != nil {
189 x.constructor, y.constructor, err)
192 x.constructor, y.constructor)
203 return FromStringDict(x.constructor, z), nil
228 if s.constructor != Default {
229 ctor = s.constructor.String() + " "
264 if eq, err := starlark.Equal(x.constructor, y.constructor); err != nil {
266 x.constructor, y.constructor, err)