code: def p_field(self, p):
          
          has_annotations = len(p) > 5 and p[6] is not None
          has_docstring = len(p) > 5 and p[7] is not None
          has_anony_def = len(p) > 5 and p[8] is not None
          p[0] = AstField(
              self.path, p.lineno(1), p.lexpos(1), p[1], p[2])
          if p[3] is not None:
              if p[3] is NullToken:
                  p[0].set_default(None)
              else:
                  p[0].set_default(p[3])
          if has_annotations:
              p[0].set_annotations(p[6])
          if has_docstring:
              p[0].set_doc(p[7])
          if has_anony_def:
              p[8].name = p[2].name
              self.anony_defs.append(p[8])
docs: field : ID type_ref default_option NL \
                      INDENT annotation_ref_list docsection anony_def_option DEDENT
                   | ID type_ref default_option NL