nodes.ex (3438B)
1 defmodule ExDoc.ModuleNode do 2 @moduledoc """ 3 Structure that represents a module. 4 """ 5 6 defstruct id: nil, 7 title: nil, 8 nested_context: nil, 9 nested_title: nil, 10 module: nil, 11 group: nil, 12 deprecated: nil, 13 doc: nil, 14 rendered_doc: nil, 15 doc_line: nil, 16 function_groups: [], 17 docs: [], 18 typespecs: [], 19 source_path: nil, 20 source_url: nil, 21 type: nil, 22 language: nil, 23 annotations: [] 24 25 @typep annotation :: atom() 26 27 @type t :: %__MODULE__{ 28 id: String.t(), 29 title: String.t(), 30 nested_context: String.t() | nil, 31 nested_title: String.t() | nil, 32 module: module(), 33 group: atom() | nil, 34 deprecated: String.t() | nil, 35 doc: ExDoc.DocAST.t() | nil, 36 rendered_doc: String.t() | nil, 37 doc_line: non_neg_integer(), 38 function_groups: [atom()], 39 docs: [ExDoc.FunctionNode.t()], 40 typespecs: [ExDoc.TypeNode.t()], 41 source_path: String.t(), 42 source_url: String.t() | nil, 43 type: atom(), 44 language: module(), 45 annotations: [annotation()] 46 } 47 end 48 49 defmodule ExDoc.FunctionNode do 50 @moduledoc """ 51 Structure that represents an individual function. 52 """ 53 54 defstruct id: nil, 55 name: nil, 56 arity: 0, 57 defaults: [], 58 deprecated: nil, 59 doc: nil, 60 rendered_doc: nil, 61 type: nil, 62 signature: nil, 63 specs: [], 64 annotations: [], 65 group: nil, 66 doc_line: nil, 67 source_path: nil, 68 source_url: nil 69 70 @typep annotation :: String.t() 71 @typep function_default :: {name :: atom(), arity :: non_neg_integer()} 72 73 @type t :: %__MODULE__{ 74 id: String.t(), 75 name: atom(), 76 arity: non_neg_integer(), 77 defaults: [function_default()], 78 deprecated: String.t() | nil, 79 doc: ExDoc.DocAST.t() | nil, 80 rendered_doc: String.t() | nil, 81 type: atom(), 82 signature: String.t(), 83 specs: [ExDoc.Language.spec_ast()], 84 annotations: [annotation()], 85 group: atom() | nil, 86 doc_line: non_neg_integer(), 87 source_path: String.t(), 88 source_url: String.t() | nil 89 } 90 end 91 92 defmodule ExDoc.TypeNode do 93 @moduledoc """ 94 Structure that represents an individual type. 95 """ 96 97 defstruct id: nil, 98 name: nil, 99 arity: 0, 100 type: nil, 101 deprecated: nil, 102 doc: nil, 103 rendered_doc: nil, 104 doc_line: nil, 105 source_path: nil, 106 source_url: nil, 107 spec: nil, 108 signature: nil, 109 annotations: [] 110 111 @typep annotation :: String.t() 112 113 @type t :: %__MODULE__{ 114 id: String.t(), 115 name: atom(), 116 arity: non_neg_integer(), 117 type: atom(), 118 deprecated: nil, 119 doc: ExDoc.DocAST.t() | nil, 120 rendered_doc: String.t() | nil, 121 doc_line: non_neg_integer(), 122 source_path: String.t(), 123 source_url: String.t() | nil, 124 spec: ExDoc.Language.spec_ast(), 125 signature: String.t(), 126 annotations: [annotation()] 127 } 128 end