forked from argotorg/fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_docs.snap
More file actions
92 lines (92 loc) · 2.91 KB
/
Copy pathfunction_docs.snap
File metadata and controls
92 lines (92 loc) · 2.91 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
---
source: crates/fe/src/extract.rs
expression: output
input_file: tests/doc_fixtures/function_docs.fe
---
{
"items": [
{
"path": "function_docs",
"name": "function_docs",
"kind": "module",
"visibility": "public",
"docs": null,
"signature": "/// Compute the sum of two values.\n///\n/// # Examples\n/// ```\n/// let result: u256 = add(1, 2)\n/// ```\npub fn add(a: u256, b: u256) -> u256 {\n return a + b\n}\n\n/// Check if a value is zero.\npub fn is_zero(val: u256) -> bool {\n return val == 0\n}",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "function_docs.fe",
"line": 1,
"column": 0
},
"source_text": "/// Compute the sum of two values.\n///\n/// # Examples\n/// ```\n/// let result: u256 = add(1, 2)\n/// ```\npub fn add(a: u256, b: u256) -> u256 {\n return a + b\n}\n\n/// Check if a value is zero.\npub fn is_zero(val: u256) -> bool {\n return val == 0\n}\n",
"trait_impls": []
},
{
"path": "function_docs::add",
"name": "add",
"kind": "function",
"visibility": "public",
"docs": {
"summary": "Compute the sum of two values.",
"body": "Compute the sum of two values.\n\n # Examples\n ```\n let result: u256 = add(1, 2)\n ```",
"sections": []
},
"signature": "pub fn add(a: u256, b: u256) -> u256",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "function_docs.fe",
"line": 1,
"column": 0
},
"source_text": "/// Compute the sum of two values.\n///\n/// # Examples\n/// ```\n/// let result: u256 = add(1, 2)\n/// ```\npub fn add(a: u256, b: u256) -> u256 {\n return a + b\n}",
"trait_impls": []
},
{
"path": "function_docs::is_zero",
"name": "is_zero",
"kind": "function",
"visibility": "public",
"docs": {
"summary": "Check if a value is zero.",
"body": "Check if a value is zero.",
"sections": []
},
"signature": "pub fn is_zero(val: u256) -> bool",
"generics": [],
"where_bounds": [],
"children": [],
"source": {
"display_file": "function_docs.fe",
"line": 11,
"column": 0
},
"source_text": "/// Check if a value is zero.\npub fn is_zero(val: u256) -> bool {\n return val == 0\n}",
"trait_impls": []
}
],
"modules": [
{
"name": "function_docs",
"path": "function_docs",
"children": [],
"items": [
{
"name": "add",
"path": "function_docs::add",
"kind": "function",
"summary": "Compute the sum of two values."
},
{
"name": "is_zero",
"path": "function_docs::is_zero",
"kind": "function",
"summary": "Check if a value is zero."
}
]
}
]
}