diff --git a/vlib/builtin/builtin.v b/vlib/builtin/builtin.v index f9c39f490f..bdeac267a6 100644 --- a/vlib/builtin/builtin.v +++ b/vlib/builtin/builtin.v @@ -110,13 +110,24 @@ pub: // FieldData holds information about a field. Fields reside on structs. pub struct FieldData { pub: - name string - attrs []string - is_pub bool - is_mut bool - is_shared bool - typ int - unaliased_typ int + name string // the name of the field f + typ int // the internal TypeID of the field f, + unaliased_typ int // if f's type was an alias of int, this will be TypeID(int) + // + attrs []string // the attributes of the field f + is_pub bool // f is in a `pub:` section + is_mut bool // f is in a `mut:` section + // + is_shared bool // `f shared Abc` + is_atomic bool // `f atomic int` , TODO + is_optional bool // `f ?string` , TODO + // + is_array bool // `f []string` , TODO + is_map bool // `f map[string]int` , TODO + is_chan bool // `f chan int` , TODO + is_struct bool // `f Abc` where Abc is a struct , TODO + // + indirections u8 // 0 for `f int`, 1 for `f &int`, 2 for `f &&int` , TODO } pub enum AttributeKind {