nomen-lang 0.9.0 → 0.11.0
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.
- package/core/System/Arena.nm +9 -7
- package/core/System/Array.nm +1 -1
- package/core/System/Atomic.nm +3 -3
- package/core/System/BigInt.nm +182 -23
- package/core/System/Buffer.nm +37 -35
- package/core/System/ClassBuffer.nm +18 -18
- package/core/System/Controls/Alert.nm +1 -1
- package/core/System/Controls/App.nm +5 -5
- package/core/System/Controls/Button.nm +1 -1
- package/core/System/Controls/CheckBox.nm +1 -1
- package/core/System/Controls/ColorPicker.nm +1 -1
- package/core/System/Controls/ComboBox.nm +1 -1
- package/core/System/Controls/Container.nm +34 -34
- package/core/System/Controls/DatePicker.nm +1 -1
- package/core/System/Controls/Form.nm +2 -2
- package/core/System/Controls/GroupBox.nm +1 -1
- package/core/System/Controls/ImageView.nm +1 -1
- package/core/System/Controls/Layout.nm +5 -5
- package/core/System/Controls/LevelIndicator.nm +1 -1
- package/core/System/Controls/ListView.nm +1 -1
- package/core/System/Controls/Menu.nm +1 -1
- package/core/System/Controls/NumberInput.nm +3 -3
- package/core/System/Controls/OtpInput.nm +2 -2
- package/core/System/Controls/OutlineView.nm +1 -1
- package/core/System/Controls/Pagination.nm +6 -6
- package/core/System/Controls/Popover.nm +1 -1
- package/core/System/Controls/Progress.nm +1 -1
- package/core/System/Controls/Radio.nm +1 -1
- package/core/System/Controls/Scrollable.nm +1 -1
- package/core/System/Controls/SearchField.nm +1 -1
- package/core/System/Controls/SecureField.nm +1 -1
- package/core/System/Controls/Segmented.nm +1 -1
- package/core/System/Controls/Select.nm +1 -1
- package/core/System/Controls/Separator.nm +1 -1
- package/core/System/Controls/Sheet.nm +1 -1
- package/core/System/Controls/Slider.nm +1 -1
- package/core/System/Controls/Spinner.nm +3 -3
- package/core/System/Controls/SplitView.nm +2 -2
- package/core/System/Controls/Stepper.nm +1 -1
- package/core/System/Controls/Switch.nm +1 -1
- package/core/System/Controls/Table.nm +1 -1
- package/core/System/Controls/Tabs.nm +1 -1
- package/core/System/Controls/Text.nm +1 -1
- package/core/System/Controls/TextBox.nm +1 -1
- package/core/System/Controls/TextView.nm +1 -1
- package/core/System/Controls/Toggle.nm +1 -1
- package/core/System/Controls/Toolbar.nm +1 -1
- package/core/System/Controls/Window.nm +11 -3
- package/core/System/Fiber.nm +16 -3
- package/core/System/Format.nm +751 -0
- package/core/System/Graph.nm +2 -2
- package/core/System/LinkedList.nm +8 -6
- package/core/System/List.nm +16 -13
- package/core/System/Map.nm +11 -9
- package/core/System/Random.nm +3 -3
- package/core/System/Set.nm +9 -7
- package/core/System/StableList.nm +7 -7
- package/core/System/Stream/File.nm +16 -16
- package/core/System/Stream/Http.nm +3 -3
- package/core/System/Stream/Tcp.nm +5 -5
- package/core/System/StringBuilder.nm +16 -16
- package/core/System/Task.nm +56 -64
- package/core/System/Test.nm +18 -18
- package/core/System/Text/Chars.nm +1 -1
- package/core/System/Text/Json.nm +12 -12
- package/core/System/Text/JsonTree.nm +8 -8
- package/core/System/Text/Regex.nm +20 -20
- package/core/System/Thread.nm +26 -3
- package/core/System/Tree.nm +19 -3
- package/dist/index.mjs +3423 -1849
- package/package.json +1 -1
- package/src/docs.ts +10 -1
package/package.json
CHANGED
package/src/docs.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type BaseNode from "../../src/nodes/BaseNode.ts";
|
|
|
6
6
|
import type BitsetNode from "../../src/nodes/BitsetNode.ts";
|
|
7
7
|
import type EnumNode from "../../src/nodes/EnumNode.ts";
|
|
8
8
|
import type FunctionNode from "../../src/nodes/FunctionNode.ts";
|
|
9
|
+
import type ParameterNode from "../../src/nodes/ParameterNode.ts";
|
|
9
10
|
import type StructNode from "../../src/nodes/StructNode.ts";
|
|
10
11
|
import type TraitNode from "../../src/nodes/TraitNode.ts";
|
|
11
12
|
import type Type from "../../src/nodes/Type.ts";
|
|
@@ -231,12 +232,20 @@ function heading_of(item: DocItem): string {
|
|
|
231
232
|
function signature_of(fn: FunctionNode): string {
|
|
232
233
|
const params = fn.params
|
|
233
234
|
.filter((p) => !p.is_self_param)
|
|
234
|
-
.map((p) => `${render_type(p.type)}${p.name ? " " + p.name : ""}`);
|
|
235
|
+
.map((p) => `${render_type(p.type)}${p.name ? " " + p.name : ""}${field_set_of(p)}`);
|
|
235
236
|
let sig = `${fn.name}(${params.join(", ")})`;
|
|
236
237
|
if (fn.return_type?.name) sig += ` -> ${render_type(fn.return_type)}`;
|
|
237
238
|
return sig;
|
|
238
239
|
}
|
|
239
240
|
|
|
241
|
+
/** The declared field set suffix (FIELD_EFFECTS.md): `{}` for "displaces
|
|
242
|
+
* nothing", `{ a, b }` for a named set, nothing for a wildcard. */
|
|
243
|
+
function field_set_of(param: ParameterNode): string {
|
|
244
|
+
if (param.field_set === undefined) return "";
|
|
245
|
+
if (param.field_set.length === 0) return " {}";
|
|
246
|
+
return ` { ${param.field_set.join(", ")} }`;
|
|
247
|
+
}
|
|
248
|
+
|
|
240
249
|
function members_of(node: BaseNode): FunctionNode[] {
|
|
241
250
|
if (node.node_type === "struct" || node.node_type === "trait") {
|
|
242
251
|
const n = node as unknown as { functions: FunctionNode[] };
|