@alloy-js/go 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE +7 -0
  3. package/api-extractor.json +4 -0
  4. package/dist/src/builtins/fmt/fmt.d.ts +147 -0
  5. package/dist/src/builtins/fmt/fmt.d.ts.map +1 -0
  6. package/dist/src/builtins/fmt/fmt.js +148 -0
  7. package/dist/src/builtins/fmt/fmt.js.map +1 -0
  8. package/dist/src/builtins/index.d.ts +2004 -0
  9. package/dist/src/builtins/index.d.ts.map +1 -0
  10. package/dist/src/builtins/index.js +9 -0
  11. package/dist/src/builtins/index.js.map +1 -0
  12. package/dist/src/builtins/io/io.d.ts +648 -0
  13. package/dist/src/builtins/io/io.d.ts.map +1 -0
  14. package/dist/src/builtins/io/io.js +650 -0
  15. package/dist/src/builtins/io/io.js.map +1 -0
  16. package/dist/src/builtins/net/net.d.ts +1210 -0
  17. package/dist/src/builtins/net/net.d.ts.map +1 -0
  18. package/dist/src/builtins/net/net.js +1212 -0
  19. package/dist/src/builtins/net/net.js.map +1 -0
  20. package/dist/src/components/ImportStatement.d.ts +15 -0
  21. package/dist/src/components/ImportStatement.d.ts.map +1 -0
  22. package/dist/src/components/ImportStatement.js +90 -0
  23. package/dist/src/components/ImportStatement.js.map +1 -0
  24. package/dist/src/components/ModuleDirectory.d.ts +8 -0
  25. package/dist/src/components/ModuleDirectory.d.ts.map +1 -0
  26. package/dist/src/components/ModuleDirectory.js +20 -0
  27. package/dist/src/components/ModuleDirectory.js.map +1 -0
  28. package/dist/src/components/Name.d.ts +2 -0
  29. package/dist/src/components/Name.d.ts.map +1 -0
  30. package/dist/src/components/Name.js +12 -0
  31. package/dist/src/components/Name.js.map +1 -0
  32. package/dist/src/components/Reference.d.ts +6 -0
  33. package/dist/src/components/Reference.d.ts.map +1 -0
  34. package/dist/src/components/Reference.js +15 -0
  35. package/dist/src/components/Reference.js.map +1 -0
  36. package/dist/src/components/SourceDirectory.d.ts +6 -0
  37. package/dist/src/components/SourceDirectory.d.ts.map +1 -0
  38. package/dist/src/components/SourceDirectory.js +30 -0
  39. package/dist/src/components/SourceDirectory.js.map +1 -0
  40. package/dist/src/components/SourceFile.d.ts +16 -0
  41. package/dist/src/components/SourceFile.d.ts.map +1 -0
  42. package/dist/src/components/SourceFile.js +75 -0
  43. package/dist/src/components/SourceFile.js.map +1 -0
  44. package/dist/src/components/doc/comment.d.ts +21 -0
  45. package/dist/src/components/doc/comment.d.ts.map +1 -0
  46. package/dist/src/components/doc/comment.js +30 -0
  47. package/dist/src/components/doc/comment.js.map +1 -0
  48. package/dist/src/components/doc/comment.test.d.ts +2 -0
  49. package/dist/src/components/doc/comment.test.d.ts.map +1 -0
  50. package/dist/src/components/doc/comment.test.js +215 -0
  51. package/dist/src/components/doc/comment.test.js.map +1 -0
  52. package/dist/src/components/function/function.d.ts +31 -0
  53. package/dist/src/components/function/function.d.ts.map +1 -0
  54. package/dist/src/components/function/function.js +134 -0
  55. package/dist/src/components/function/function.js.map +1 -0
  56. package/dist/src/components/function/function.test.d.ts +2 -0
  57. package/dist/src/components/function/function.test.d.ts.map +1 -0
  58. package/dist/src/components/function/function.test.js +410 -0
  59. package/dist/src/components/function/function.test.js.map +1 -0
  60. package/dist/src/components/index.d.ts +16 -0
  61. package/dist/src/components/index.d.ts.map +1 -0
  62. package/dist/src/components/index.js +16 -0
  63. package/dist/src/components/index.js.map +1 -0
  64. package/dist/src/components/interface/declaration.d.ts +68 -0
  65. package/dist/src/components/interface/declaration.d.ts.map +1 -0
  66. package/dist/src/components/interface/declaration.js +181 -0
  67. package/dist/src/components/interface/declaration.js.map +1 -0
  68. package/dist/src/components/interface/interface.test.d.ts +2 -0
  69. package/dist/src/components/interface/interface.test.d.ts.map +1 -0
  70. package/dist/src/components/interface/interface.test.js +517 -0
  71. package/dist/src/components/interface/interface.test.js.map +1 -0
  72. package/dist/src/components/package.test.d.ts +2 -0
  73. package/dist/src/components/package.test.d.ts.map +1 -0
  74. package/dist/src/components/package.test.js +89 -0
  75. package/dist/src/components/package.test.js.map +1 -0
  76. package/dist/src/components/parameters/parameters.d.ts +15 -0
  77. package/dist/src/components/parameters/parameters.d.ts.map +1 -0
  78. package/dist/src/components/parameters/parameters.js +58 -0
  79. package/dist/src/components/parameters/parameters.js.map +1 -0
  80. package/dist/src/components/parameters/typeparameters.d.ts +25 -0
  81. package/dist/src/components/parameters/typeparameters.d.ts.map +1 -0
  82. package/dist/src/components/parameters/typeparameters.js +53 -0
  83. package/dist/src/components/parameters/typeparameters.js.map +1 -0
  84. package/dist/src/components/pointer/pointer.d.ts +9 -0
  85. package/dist/src/components/pointer/pointer.d.ts.map +1 -0
  86. package/dist/src/components/pointer/pointer.js +8 -0
  87. package/dist/src/components/pointer/pointer.js.map +1 -0
  88. package/dist/src/components/stc/index.d.ts +27 -0
  89. package/dist/src/components/stc/index.d.ts.map +1 -0
  90. package/dist/src/components/stc/index.js +27 -0
  91. package/dist/src/components/stc/index.js.map +1 -0
  92. package/dist/src/components/struct/declaration.d.ts +62 -0
  93. package/dist/src/components/struct/declaration.d.ts.map +1 -0
  94. package/dist/src/components/struct/declaration.js +161 -0
  95. package/dist/src/components/struct/declaration.js.map +1 -0
  96. package/dist/src/components/struct/struct.test.d.ts +2 -0
  97. package/dist/src/components/struct/struct.test.d.ts.map +1 -0
  98. package/dist/src/components/struct/struct.test.js +741 -0
  99. package/dist/src/components/struct/struct.test.js.map +1 -0
  100. package/dist/src/components/type/declaration.d.ts +29 -0
  101. package/dist/src/components/type/declaration.d.ts.map +1 -0
  102. package/dist/src/components/type/declaration.js +63 -0
  103. package/dist/src/components/type/declaration.js.map +1 -0
  104. package/dist/src/components/var/declaration.d.ts +27 -0
  105. package/dist/src/components/var/declaration.d.ts.map +1 -0
  106. package/dist/src/components/var/declaration.js +84 -0
  107. package/dist/src/components/var/declaration.js.map +1 -0
  108. package/dist/src/components/var/var-declaration.test.d.ts +2 -0
  109. package/dist/src/components/var/var-declaration.test.d.ts.map +1 -0
  110. package/dist/src/components/var/var-declaration.test.js +340 -0
  111. package/dist/src/components/var/var-declaration.test.js.map +1 -0
  112. package/dist/src/context/package.d.ts +9 -0
  113. package/dist/src/context/package.d.ts.map +1 -0
  114. package/dist/src/context/package.js +6 -0
  115. package/dist/src/context/package.js.map +1 -0
  116. package/dist/src/create-module.d.ts +47 -0
  117. package/dist/src/create-module.d.ts.map +1 -0
  118. package/dist/src/create-module.js +158 -0
  119. package/dist/src/create-module.js.map +1 -0
  120. package/dist/src/create-module.test.d.ts +2 -0
  121. package/dist/src/create-module.test.d.ts.map +1 -0
  122. package/dist/src/create-module.test.js +147 -0
  123. package/dist/src/create-module.test.js.map +1 -0
  124. package/dist/src/index.d.ts +6 -0
  125. package/dist/src/index.d.ts.map +1 -0
  126. package/dist/src/index.js +6 -0
  127. package/dist/src/index.js.map +1 -0
  128. package/dist/src/name-policy.d.ts +5 -0
  129. package/dist/src/name-policy.d.ts.map +1 -0
  130. package/dist/src/name-policy.js +27 -0
  131. package/dist/src/name-policy.js.map +1 -0
  132. package/dist/src/scopes/contexts.d.ts +9 -0
  133. package/dist/src/scopes/contexts.d.ts.map +1 -0
  134. package/dist/src/scopes/contexts.js +34 -0
  135. package/dist/src/scopes/contexts.js.map +1 -0
  136. package/dist/src/scopes/factories.d.ts +7 -0
  137. package/dist/src/scopes/factories.d.ts.map +1 -0
  138. package/dist/src/scopes/factories.js +16 -0
  139. package/dist/src/scopes/factories.js.map +1 -0
  140. package/dist/src/scopes/function.d.ts +9 -0
  141. package/dist/src/scopes/function.d.ts.map +1 -0
  142. package/dist/src/scopes/function.js +14 -0
  143. package/dist/src/scopes/function.js.map +1 -0
  144. package/dist/src/scopes/go.d.ts +8 -0
  145. package/dist/src/scopes/go.d.ts.map +1 -0
  146. package/dist/src/scopes/go.js +12 -0
  147. package/dist/src/scopes/go.js.map +1 -0
  148. package/dist/src/scopes/index.d.ts +10 -0
  149. package/dist/src/scopes/index.d.ts.map +1 -0
  150. package/dist/src/scopes/index.js +10 -0
  151. package/dist/src/scopes/index.js.map +1 -0
  152. package/dist/src/scopes/lexical.d.ts +8 -0
  153. package/dist/src/scopes/lexical.d.ts.map +1 -0
  154. package/dist/src/scopes/lexical.js +11 -0
  155. package/dist/src/scopes/lexical.js.map +1 -0
  156. package/dist/src/scopes/module.d.ts +9 -0
  157. package/dist/src/scopes/module.d.ts.map +1 -0
  158. package/dist/src/scopes/module.js +31 -0
  159. package/dist/src/scopes/module.js.map +1 -0
  160. package/dist/src/scopes/named-type.d.ts +23 -0
  161. package/dist/src/scopes/named-type.d.ts.map +1 -0
  162. package/dist/src/scopes/named-type.js +33 -0
  163. package/dist/src/scopes/named-type.js.map +1 -0
  164. package/dist/src/scopes/package.d.ts +11 -0
  165. package/dist/src/scopes/package.d.ts.map +1 -0
  166. package/dist/src/scopes/package.js +39 -0
  167. package/dist/src/scopes/package.js.map +1 -0
  168. package/dist/src/scopes/source-file.d.ts +17 -0
  169. package/dist/src/scopes/source-file.d.ts.map +1 -0
  170. package/dist/src/scopes/source-file.js +42 -0
  171. package/dist/src/scopes/source-file.js.map +1 -0
  172. package/dist/src/symbols/factories.d.ts +25 -0
  173. package/dist/src/symbols/factories.d.ts.map +1 -0
  174. package/dist/src/symbols/factories.js +114 -0
  175. package/dist/src/symbols/factories.js.map +1 -0
  176. package/dist/src/symbols/function.d.ts +10 -0
  177. package/dist/src/symbols/function.d.ts.map +1 -0
  178. package/dist/src/symbols/function.js +12 -0
  179. package/dist/src/symbols/function.js.map +1 -0
  180. package/dist/src/symbols/go.d.ts +22 -0
  181. package/dist/src/symbols/go.d.ts.map +1 -0
  182. package/dist/src/symbols/go.js +56 -0
  183. package/dist/src/symbols/go.js.map +1 -0
  184. package/dist/src/symbols/index.d.ts +7 -0
  185. package/dist/src/symbols/index.d.ts.map +1 -0
  186. package/dist/src/symbols/index.js +7 -0
  187. package/dist/src/symbols/index.js.map +1 -0
  188. package/dist/src/symbols/named-type.d.ts +24 -0
  189. package/dist/src/symbols/named-type.d.ts.map +1 -0
  190. package/dist/src/symbols/named-type.js +53 -0
  191. package/dist/src/symbols/named-type.js.map +1 -0
  192. package/dist/src/symbols/package.d.ts +18 -0
  193. package/dist/src/symbols/package.d.ts.map +1 -0
  194. package/dist/src/symbols/package.js +38 -0
  195. package/dist/src/symbols/package.js.map +1 -0
  196. package/dist/src/symbols/reference.d.ts +3 -0
  197. package/dist/src/symbols/reference.d.ts.map +1 -0
  198. package/dist/src/symbols/reference.js +76 -0
  199. package/dist/src/symbols/reference.js.map +1 -0
  200. package/dist/test/utils.d.ts +8 -0
  201. package/dist/test/utils.d.ts.map +1 -0
  202. package/dist/test/utils.js +68 -0
  203. package/dist/test/utils.js.map +1 -0
  204. package/dist/test/vitest.setup.d.ts +2 -0
  205. package/dist/test/vitest.setup.d.ts.map +1 -0
  206. package/dist/test/vitest.setup.js +2 -0
  207. package/dist/test/vitest.setup.js.map +1 -0
  208. package/dist/tsconfig.tsbuildinfo +1 -0
  209. package/package.json +45 -0
  210. package/src/builtins/fmt/fmt.ts +78 -0
  211. package/src/builtins/index.ts +9 -0
  212. package/src/builtins/io/io.ts +355 -0
  213. package/src/builtins/net/net.ts +502 -0
  214. package/src/components/ImportStatement.tsx +115 -0
  215. package/src/components/ModuleDirectory.tsx +18 -0
  216. package/src/components/Name.tsx +11 -0
  217. package/src/components/Reference.tsx +18 -0
  218. package/src/components/SourceDirectory.tsx +32 -0
  219. package/src/components/SourceFile.tsx +74 -0
  220. package/src/components/doc/comment.test.tsx +278 -0
  221. package/src/components/doc/comment.tsx +40 -0
  222. package/src/components/function/function.test.tsx +387 -0
  223. package/src/components/function/function.tsx +194 -0
  224. package/src/components/index.ts +15 -0
  225. package/src/components/interface/declaration.tsx +250 -0
  226. package/src/components/interface/interface.test.tsx +390 -0
  227. package/src/components/package.test.tsx +63 -0
  228. package/src/components/parameters/parameters.tsx +74 -0
  229. package/src/components/parameters/typeparameters.tsx +78 -0
  230. package/src/components/pointer/pointer.tsx +12 -0
  231. package/src/components/stc/index.ts +27 -0
  232. package/src/components/struct/declaration.tsx +228 -0
  233. package/src/components/struct/struct.test.tsx +558 -0
  234. package/src/components/type/declaration.tsx +93 -0
  235. package/src/components/var/declaration.tsx +138 -0
  236. package/src/components/var/var-declaration.test.tsx +236 -0
  237. package/src/context/package.ts +13 -0
  238. package/src/create-module.test.tsx +128 -0
  239. package/src/create-module.ts +347 -0
  240. package/src/index.ts +5 -0
  241. package/src/name-policy.ts +65 -0
  242. package/src/scopes/contexts.ts +45 -0
  243. package/src/scopes/factories.ts +29 -0
  244. package/src/scopes/function.ts +22 -0
  245. package/src/scopes/go.ts +18 -0
  246. package/src/scopes/index.ts +9 -0
  247. package/src/scopes/lexical.ts +14 -0
  248. package/src/scopes/module.ts +35 -0
  249. package/src/scopes/named-type.ts +49 -0
  250. package/src/scopes/package.ts +55 -0
  251. package/src/scopes/source-file.ts +66 -0
  252. package/src/symbols/factories.ts +234 -0
  253. package/src/symbols/function.ts +17 -0
  254. package/src/symbols/go.ts +82 -0
  255. package/src/symbols/index.ts +6 -0
  256. package/src/symbols/named-type.ts +90 -0
  257. package/src/symbols/package.ts +54 -0
  258. package/src/symbols/reference.ts +87 -0
  259. package/temp/api.json +8753 -0
  260. package/test/utils.tsx +77 -0
  261. package/test/vitest.setup.ts +1 -0
  262. package/tsconfig.json +15 -0
  263. package/tsdoc-metadata.json +11 -0
  264. package/vitest.config.ts +13 -0
@@ -0,0 +1,215 @@
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
+ import { List, Prose } from "@alloy-js/core";
3
+ import "@alloy-js/core/testing";
4
+ import { d } from "@alloy-js/core/testing";
5
+ import { describe, expect, it } from "vitest";
6
+ import { BlockComment, LineComment } from "./comment.js";
7
+ describe("GoLineComment", () => {
8
+ it("formats properly a simple comment", () => {
9
+ const template = [_$createComponent(LineComment, {
10
+ children: "Hello!"
11
+ }), _$createIntrinsic("hbr", {}), "Should not be part of the comment"];
12
+ expect(template).toRenderTo(d`
13
+ // Hello!
14
+ Should not be part of the comment
15
+ `, {
16
+ printWidth: 40
17
+ });
18
+ });
19
+ it("should not add extra line breaks", () => {
20
+ const template = [_$createComponent(List, {
21
+ hardline: true,
22
+ get children() {
23
+ return _$createComponent(LineComment, {
24
+ get children() {
25
+ return ["Hello!", _$createIntrinsic("hbr", {}), _$createIntrinsic("hbr", {}), "This is another line"];
26
+ }
27
+ });
28
+ }
29
+ }), _$createIntrinsic("hbr", {}), "Hello"];
30
+ expect(template).toRenderTo(d`
31
+ // Hello!
32
+ //
33
+ // This is another line
34
+ Hello
35
+ `, {
36
+ printWidth: 40
37
+ });
38
+ });
39
+ it("formats properly multiple children", () => {
40
+ const template = [_$createComponent(LineComment, {
41
+ get children() {
42
+ return [_$createComponent(Prose, {
43
+ children: "Hello!"
44
+ }), _$createIntrinsic("hbr", {}), _$createIntrinsic("hbr", {}), _$createComponent(Prose, {
45
+ children: "This is another line"
46
+ })];
47
+ }
48
+ }), _$createIntrinsic("hbr", {}), "foo should be outside the comment"];
49
+ expect(template).toRenderTo(d`
50
+ // Hello!
51
+ //
52
+ // This is another line
53
+ foo should be outside the comment
54
+ `, {
55
+ printWidth: 40
56
+ });
57
+ });
58
+ it("It correctly do word wrapping", () => {
59
+ const template = [_$createComponent(LineComment, {
60
+ get children() {
61
+ return _$createComponent(Prose, {
62
+ children: "This is a very long line that should be broken into multiple lines. It should also be aligned properly. The line breaks in this paragraph should not be carried over into the JSDoc comment."
63
+ });
64
+ }
65
+ }), _$createIntrinsic("hbr", {}), ["This should not be part of the comment"]];
66
+ expect(template).toRenderTo(d`
67
+ // This is a very long line that should
68
+ // be broken into multiple lines. It
69
+ // should also be aligned properly. The
70
+ // line breaks in this paragraph should
71
+ // not be carried over into the JSDoc
72
+ // comment.
73
+ This should not be part of the comment
74
+ `, {
75
+ printWidth: 40
76
+ });
77
+ });
78
+ it("formats properly", () => {
79
+ const template = _$createComponent(LineComment, {
80
+ get children() {
81
+ return [_$createComponent(Prose, {
82
+ children: "This is a long paragraph that should end up being broken into multiple paragraphs. Moreover, the line breaks in this paragraph should not be carried over into the JSDoc comment."
83
+ }), _$createIntrinsic("hbr", {}), _$createIntrinsic("hbr", {}), _$createComponent(Prose, {
84
+ children: "This is another paragraph. There should be a couple breaks in front of it."
85
+ })];
86
+ }
87
+ });
88
+ expect(template).toRenderTo(d`
89
+ // This is a long paragraph that should
90
+ // end up being broken into multiple
91
+ // paragraphs. Moreover, the line breaks
92
+ // in this paragraph should not be
93
+ // carried over into the JSDoc comment.
94
+ //
95
+ // This is another paragraph. There
96
+ // should be a couple breaks in front of
97
+ // it.
98
+ `, {
99
+ printWidth: 40
100
+ });
101
+ });
102
+ });
103
+ describe("GoBlockComment", () => {
104
+ it("formats properly a simple comment", () => {
105
+ const template = [_$createComponent(BlockComment, {
106
+ children: "Hello!"
107
+ }), _$createIntrinsic("hbr", {}), "Should not be part of the comment"];
108
+ expect(template).toRenderTo(d`
109
+ /*
110
+ Hello!
111
+ */
112
+ Should not be part of the comment
113
+ `, {
114
+ printWidth: 40
115
+ });
116
+ });
117
+ it("should not add extra line breaks", () => {
118
+ const template = [_$createComponent(List, {
119
+ hardline: true,
120
+ get children() {
121
+ return _$createComponent(BlockComment, {
122
+ get children() {
123
+ return [_$createComponent(Prose, {
124
+ children: "Hello!"
125
+ }), _$createComponent(Prose, {
126
+ children: "World!"
127
+ }), _$createComponent(Prose, {
128
+ children: "This is another line"
129
+ })];
130
+ }
131
+ });
132
+ }
133
+ }), _$createIntrinsic("hbr", {}), "Hello"];
134
+ expect(template).toRenderTo(d`
135
+ /*
136
+ Hello!
137
+
138
+ World!
139
+
140
+ This is another line
141
+ */
142
+ Hello
143
+ `, {
144
+ printWidth: 40
145
+ });
146
+ });
147
+ it("formats properly multiple children", () => {
148
+ const template = [_$createComponent(BlockComment, {
149
+ get children() {
150
+ return [_$createComponent(Prose, {
151
+ children: "Hello!"
152
+ }), _$createComponent(Prose, {
153
+ children: "This is another line"
154
+ })];
155
+ }
156
+ }), _$createIntrinsic("hbr", {}), "foo should be outside the comment"];
157
+ expect(template).toRenderTo(d`
158
+ /*
159
+ Hello!
160
+
161
+ This is another line
162
+ */
163
+ foo should be outside the comment
164
+ `, {
165
+ printWidth: 40
166
+ });
167
+ });
168
+ it("It correctly do word wrapping", () => {
169
+ const template = [_$createComponent(BlockComment, {
170
+ get children() {
171
+ return _$createComponent(Prose, {
172
+ children: "This is a very long line that should be broken into multiple lines. It should also be aligned properly. The line breaks in this paragraph should not be carried over into the JSDoc comment."
173
+ });
174
+ }
175
+ }), _$createIntrinsic("hbr", {}), ["This should not be part of the comment"]];
176
+ expect(template).toRenderTo(d`
177
+ /*
178
+ This is a very long line that should be
179
+ broken into multiple lines. It should
180
+ also be aligned properly. The line
181
+ breaks in this paragraph should not be
182
+ carried over into the JSDoc comment.
183
+ */
184
+ This should not be part of the comment
185
+ `, {
186
+ printWidth: 40
187
+ });
188
+ });
189
+ it("formats properly", () => {
190
+ const template = _$createComponent(BlockComment, {
191
+ get children() {
192
+ return [_$createComponent(Prose, {
193
+ children: "This is a long paragraph that should end up being broken into multiple paragraphs. Moreover, the line breaks in this paragraph should not be carried over into the JSDoc comment."
194
+ }), _$createComponent(Prose, {
195
+ children: "This is another paragraph. There should be a couple breaks in front of it."
196
+ })];
197
+ }
198
+ });
199
+ expect(template).toRenderTo(d`
200
+ /*
201
+ This is a long paragraph that should end
202
+ up being broken into multiple
203
+ paragraphs. Moreover, the line breaks in
204
+ this paragraph should not be carried
205
+ over into the JSDoc comment.
206
+
207
+ This is another paragraph. There should
208
+ be a couple breaks in front of it.
209
+ */
210
+ `, {
211
+ printWidth: 40
212
+ });
213
+ });
214
+ });
215
+ //# sourceMappingURL=comment.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["List","Prose","d","describe","expect","it","BlockComment","LineComment","template","_$createComponent","children","_$createIntrinsic","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AACA;AACA;AACA;AACA;AACA,OAAO,EACD;MAAEW,UAAU,EAAE;IAAG,CACnB,CAAC;EACH,CAAC,CAAC;EAEFR,EAAE,CAAC,kBAAkB,EAAE,MAAM;IAC3B,MAAMG,QAAQ,GAAAC,iBAAA,CACXH,YAAY;MAAA,IAAAI,SAAA;QAAA,QAAAD,iBAAA,CACVR,KAAK;UAAAS,QAAA;QAAA,IAAAD,iBAAA,CAKLR,KAAK;UAAAS,QAAA;QAAA;MAAA;IAAA,EAKT;IAEDN,MAAM,CAACI,QAAQ,CAAC,CAACI,UAAU,CACzBV,CAAC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,EACD;MAAEW,UAAU,EAAE;IAAG,CACnB,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ import { Children, Namekey, Refkey } from "@alloy-js/core";
2
+ import { FunctionParameterProps } from "../parameters/parameters.jsx";
3
+ import { TypeParameterProps } from "../parameters/typeparameters.jsx";
4
+ export interface FunctionProps {
5
+ name: string | Namekey;
6
+ parameters?: FunctionParameterProps[];
7
+ returns?: Children;
8
+ refkey?: Refkey;
9
+ /** Doc comment */
10
+ doc?: Children;
11
+ /** Go receiver (for methods) */
12
+ receiver?: Children;
13
+ /** Type parameters for generic functions */
14
+ typeParameters?: TypeParameterProps[];
15
+ /**
16
+ * Whether to render the function in a single line.
17
+ * This will only compile if `children` is a single line as well.
18
+ * This is not common in Go, so use with caution.
19
+ */
20
+ singleLine?: boolean;
21
+ children?: Children;
22
+ }
23
+ export declare function FunctionDeclaration(props: FunctionProps): Children;
24
+ export interface FuncReceiverProps {
25
+ name: string | Namekey;
26
+ type: Children;
27
+ refkey?: Refkey;
28
+ typeParameters?: TypeParameterProps[];
29
+ }
30
+ export declare function FunctionReceiver(props: FuncReceiverProps): Children;
31
+ //# sourceMappingURL=function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../src/components/function/function.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQR,OAAO,EACP,MAAM,EAOP,MAAM,gBAAgB,CAAC;AAYxB,OAAO,EACL,sBAAsB,EAEvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,kBAAkB,EAEnB,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,kBAAkB;IAClB,GAAG,CAAC,EAAE,QAAQ,CAAC;IAEf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAEtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,YAkEvD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,YAmDxD"}
@@ -0,0 +1,134 @@
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
+ import { Block, computed, Declaration, DeclarationContext, effect, For, Indent, Name, Scope, shallowRef, Show, takeSymbols, useContext, watch } from "@alloy-js/core";
3
+ import { useGoScope } from "../../scopes/contexts.js";
4
+ import { createFunctionScope } from "../../scopes/factories.js";
5
+ import { GoSourceFileScope } from "../../scopes/source-file.js";
6
+ import { createFunctionSymbol, createParameterSymbol } from "../../symbols/factories.js";
7
+ import { FunctionSymbol } from "../../symbols/function.js";
8
+ import { NamedTypeSymbol } from "../../symbols/named-type.js";
9
+ import { LineComment } from "../doc/comment.js";
10
+ import { FunctionParameters } from "../parameters/parameters.js";
11
+ import { TypeParameters } from "../parameters/typeparameters.js";
12
+
13
+ // properties for creating a function
14
+
15
+ // a Go function
16
+ export function FunctionDeclaration(props) {
17
+ const isFileScope = useGoScope() instanceof GoSourceFileScope;
18
+ if (props.receiver && !isFileScope) {
19
+ throw new Error("Methods can only be declared in file scope.");
20
+ }
21
+ const functionSymbol = createFunctionSymbol(props.name, !!props.receiver, {
22
+ refkeys: props.refkey
23
+ });
24
+
25
+ // scope for function declaration
26
+ const functionScope = createFunctionScope();
27
+
28
+ // note that scope wraps the function declaration so that the params get the correct scope
29
+ return _$createComponent(Declaration, {
30
+ symbol: functionSymbol,
31
+ get children() {
32
+ return _$createComponent(Scope, {
33
+ value: functionScope,
34
+ get children() {
35
+ return [_$createComponent(Show, {
36
+ get when() {
37
+ return Boolean(props.doc);
38
+ },
39
+ get children() {
40
+ return [_$createComponent(LineComment, {
41
+ get children() {
42
+ return props.doc;
43
+ }
44
+ }), _$createIntrinsic("hbr", {})];
45
+ }
46
+ }), "func", " ", _$memo(() => _$memo(() => !!props.receiver)() ? ["(", _$memo(() => props.receiver), ") "] : null), _$createComponent(Name, {}), _$createComponent(TypeParameters, {
47
+ get parameters() {
48
+ return props.typeParameters;
49
+ }
50
+ }), _$createComponent(FunctionParameters, {
51
+ get parameters() {
52
+ return props.parameters;
53
+ }
54
+ }), " ", _$memo(() => _$memo(() => !!props.returns)() ? _$memo(() => !!(Array.isArray(props.returns) && props.returns.length > 1))() ? [_$createIntrinsic("group", {
55
+ get children() {
56
+ return ["(", _$createComponent(Indent, {
57
+ softline: true,
58
+ get children() {
59
+ return _$createComponent(For, {
60
+ get each() {
61
+ return props.returns;
62
+ },
63
+ get joiner() {
64
+ return [",", _$createIntrinsic("ifBreak", {
65
+ flatContents: " ",
66
+ get children() {
67
+ return _$createIntrinsic("sbr", {});
68
+ }
69
+ })];
70
+ },
71
+ get ender() {
72
+ return _$createIntrinsic("ifBreak", {
73
+ children: ","
74
+ });
75
+ },
76
+ children: ret => ret
77
+ });
78
+ }
79
+ }), _$createIntrinsic("sbr", {}), ")"];
80
+ }
81
+ }), " "] : [_$memo(() => props.returns), " "] : null), _$memo(() => _$memo(() => !!!props.children)() ? "{}" : _$memo(() => !!props.singleLine)() ? ["{", " ", _$memo(() => props.children), " ", "}"] : _$createComponent(Block, {
82
+ get children() {
83
+ return props.children;
84
+ }
85
+ }))];
86
+ }
87
+ });
88
+ }
89
+ });
90
+ }
91
+ export function FunctionReceiver(props) {
92
+ const receiverSymbol = createParameterSymbol(props.name, {
93
+ refkeys: props.refkey
94
+ });
95
+ const functionSymbol = useContext(DeclarationContext);
96
+ if (!(functionSymbol instanceof FunctionSymbol)) {
97
+ throw new Error("FuncReceiver must be used inside a function.");
98
+ }
99
+ const typeParams = shallowRef(props.typeParameters ?? []);
100
+ const taken = takeSymbols();
101
+ effect(() => {
102
+ if (taken.size !== 1) return;
103
+ const symbol = Array.from(taken)[0];
104
+ if (symbol.enclosingPackage !== receiverSymbol.enclosingPackage) {
105
+ throw new Error(`Receiver symbol ${receiverSymbol.name} must be in the same package as the type ${symbol.name}.`);
106
+ }
107
+ if (!(symbol instanceof NamedTypeSymbol)) {
108
+ throw new Error(`Receiver type must be a named type, got ${symbol.constructor.name}.`);
109
+ }
110
+ functionSymbol.spaces = symbol.members;
111
+ if (!props.typeParameters) {
112
+ typeParams.value = symbol.typeParameters ?? [];
113
+ }
114
+ watch(() => symbol.typeParameters, newParams => {
115
+ if (props.typeParameters) return;
116
+ typeParams.value = newParams ?? [];
117
+ });
118
+ });
119
+ const typeParamsComponent = computed(() => {
120
+ if (typeParams.value.length === 0) return null;
121
+ return _$createComponent(TypeParameters, {
122
+ get parameters() {
123
+ return typeParams.value;
124
+ }
125
+ });
126
+ });
127
+ return _$createComponent(Declaration, {
128
+ symbol: receiverSymbol,
129
+ get children() {
130
+ return [_$createComponent(Name, {}), " ", _$memo(() => props.type), _$memo(() => typeParamsComponent.value)];
131
+ }
132
+ });
133
+ }
134
+ //# sourceMappingURL=function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Block","computed","Declaration","DeclarationContext","effect","For","Indent","Name","Scope","shallowRef","Show","takeSymbols","useContext","watch","useGoScope","createFunctionScope","GoSourceFileScope","createFunctionSymbol","createParameterSymbol","FunctionSymbol","NamedTypeSymbol","LineComment","FunctionParameters","TypeParameters","FunctionDeclaration","props","isFileScope","receiver","Error","functionSymbol","name","refkeys","refkey","functionScope","_$createComponent","symbol","children","value","when","Boolean","doc","_$createIntrinsic","_$memo","parameters","typeParameters","returns","Array","isArray","length","softline","each","joiner","flatContents","ender","ret","singleLine","FunctionReceiver","receiverSymbol","typeParams","taken","size","from","enclosingPackage","constructor","spaces","members","newParams","typeParamsComponent","type"],"sources":["../../../../src/components/function/function.tsx"],"sourcesContent":[null],"mappings":";AAAA,SACEA,KAAK,EAELC,QAAQ,EACRC,WAAW,EACXC,kBAAkB,EAClBC,MAAM,EACNC,GAAG,EACHC,MAAM,EACNC,IAAI,EAGJC,KAAK,EACLC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,KAAK,QACA,gBAAgB;AACvB,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SACEC,oBAAoB,EACpBC,qBAAqB,QAChB,4BAA4B;AACnC,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,WAAW;AACpB,SAEEC,kBAAkB;AAEpB,SAEEC,cAAc;;AAGhB;;AA2BA;AACA,OAAO,SA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,CAAC,EAAE,OAAO,IAAI;IAC9C,OAAAd,iBAAA,CAAQX,cAAc;MAAA,IAACoB,UAAUA,CAAA;QAAA,OAAEe,UAAU,CAACrB,KAAK;MAAA;IAAA;EACrD,CAAC,CAAC;EAEF,OAAAH,iBAAA,CACGhC,WAAW;IAACiC,MAAM,EAAEsB,cAAc;IAAA,IAAArB,SAAA;MAAA,QAAAF,iBAAA,CAChC3B,IAAI,YAAAmC,MAAA,OAAKjB,KAAK,CAAC2C,IAAI,GAAA1B,MAAA,OACnByB,mBAAmB,CAAC9B,KAAK;IAAA;EAAA;AAGhC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=function.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.test.d.ts","sourceRoot":"","sources":["../../../../src/components/function/function.test.tsx"],"names":[],"mappings":""}