forked from argotorg/fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule_tree.snap
More file actions
150 lines (150 loc) · 4.7 KB
/
Copy pathmodule_tree.snap
File metadata and controls
150 lines (150 loc) · 4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
source: crates/fe/src/extract.rs
expression: output
input_file: tests/doc_fixtures/module_tree.fe
---
{
"items": [
{
"path": "module_tree",
"name": "module_tree",
"kind": "module",
"visibility": "public",
"docs": null,
"signature": "/// The root module.\n\n/// An inner module for math operations.\npub mod math {\n /// Add two numbers.\n pub fn add(a: u256, b: u256) -> u256 {\n return a + b\n }\n\n /// Multiply two numbers.\n pub fn mul(a: u256, b: u256) -> u256 {\n return a * b\n }\n}\n\n/// A top-level constant.\npub const MAX_VALUE: u256 = 1000",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "module_tree.fe",
"line": 1,
"column": 0
},
"source_text": "/// The root module.\n\n/// An inner module for math operations.\npub mod math {\n /// Add two numbers.\n pub fn add(a: u256, b: u256) -> u256 {\n return a + b\n }\n\n /// Multiply two numbers.\n pub fn mul(a: u256, b: u256) -> u256 {\n return a * b\n }\n}\n\n/// A top-level constant.\npub const MAX_VALUE: u256 = 1000\n",
"trait_impls": []
},
{
"path": "module_tree::math",
"name": "math",
"kind": "module",
"visibility": "public",
"docs": {
"summary": "The root module.\n An inner module for math operations.",
"body": "The root module.\n An inner module for math operations.",
"sections": []
},
"signature": "pub mod math",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "module_tree.fe",
"line": 1,
"column": 0
},
"source_text": "/// The root module.\n\n/// An inner module for math operations.\npub mod math {\n /// Add two numbers.\n pub fn add(a: u256, b: u256) -> u256 {\n return a + b\n }\n\n /// Multiply two numbers.\n pub fn mul(a: u256, b: u256) -> u256 {\n return a * b\n }\n}",
"trait_impls": []
},
{
"path": "module_tree::math::add",
"name": "add",
"kind": "function",
"visibility": "public",
"docs": {
"summary": "Add two numbers.",
"body": "Add two numbers.",
"sections": []
},
"signature": "pub fn add(a: u256, b: u256) -> u256",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "module_tree.fe",
"line": 5,
"column": 4
},
"source_text": "/// Add two numbers.\n pub fn add(a: u256, b: u256) -> u256 {\n return a + b\n }",
"trait_impls": []
},
{
"path": "module_tree::math::mul",
"name": "mul",
"kind": "function",
"visibility": "public",
"docs": {
"summary": "Multiply two numbers.",
"body": "Multiply two numbers.",
"sections": []
},
"signature": "pub fn mul(a: u256, b: u256) -> u256",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "module_tree.fe",
"line": 10,
"column": 4
},
"source_text": "/// Multiply two numbers.\n pub fn mul(a: u256, b: u256) -> u256 {\n return a * b\n }",
"trait_impls": []
},
{
"path": "module_tree::MAX_VALUE",
"name": "MAX_VALUE",
"kind": "const",
"visibility": "public",
"docs": {
"summary": "A top-level constant.",
"body": "A top-level constant.",
"sections": []
},
"signature": "pub const MAX_VALUE: u256 = 1000",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "module_tree.fe",
"line": 16,
"column": 0
},
"source_text": "/// A top-level constant.\npub const MAX_VALUE: u256 = 1000",
"trait_impls": []
}
],
"modules": [
{
"name": "module_tree",
"path": "module_tree",
"children": [
{
"name": "math",
"path": "module_tree::math",
"children": [],
"items": [
{
"name": "add",
"path": "module_tree::math::add",
"kind": "function",
"summary": "Add two numbers."
},
{
"name": "mul",
"path": "module_tree::math::mul",
"kind": "function",
"summary": "Multiply two numbers."
}
]
}
],
"items": [
{
"name": "MAX_VALUE",
"path": "module_tree::MAX_VALUE",
"kind": "const",
"summary": "A top-level constant."
}
]
}
]
}