parameters: (struct: syntax.Struct, idl_file: syntax.IDLParsedSpec,
                            idl_file_path: str)
return_statement: return all_fields
docstring: Get all the fields of a struct, including the chained struct fields.
docstring_summary: Get all the fields of a struct, including the chained struct fields.
docstring_tokens: Get all the fields of a struct including the chained struct fields .
function: def get_all_struct_fields(struct: syntax.Struct, idl_file: syntax.IDLParsedSpec,
                            idl_file_path: str):
      """Get all the fields of a struct, including the chained struct fields."""
      all_fields = struct.fields or []
      for chained_struct in struct.chained_structs or []:
          resolved_chained_struct = get_chained_type_or_struct(chained_struct, idl_file,
                                                               idl_file_path)
          if resolved_chained_struct is not None:
              for field in resolved_chained_struct.fields:
                  all_fields.append(field)
  
      return all_fields
function_tokens: def get_all_struct_fields ( struct : syntax . Struct , idl_file : syntax . IDLParsedSpec , idl_file_path : str ) : all_fields = struct . fields or [ ] for chained_struct in struct . chained_structs or [ ] : resolved_chained_struct = get_chained_type_or_struct ( chained_struct , idl_file , idl_file_path ) if resolved_chained_struct is not None : for field in resolved_chained_struct . fields : all_fields . append ( field ) return all_fields