@neocompose/cli 0.32.3 → 0.33.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/CHANGELOG.md +46 -0
- package/dist/neo.mjs +920 -276
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/declarations-and-construction.md +8 -4
- package/skills/neocompose-cli/references/neoscript.md +30 -4
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@ wrappers.
|
|
|
83
83
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
|
-
<!-- reviewed-through-cli: 0.
|
|
86
|
+
<!-- reviewed-through-cli: 0.33.0 -->
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -21,10 +21,14 @@ migration, or `.neoflow` file. NeoFlow has its own single-dialogue exception.
|
|
|
21
21
|
Persist the declared identifier as the schema name; there is no separate
|
|
22
22
|
technical/display name. Keep existing IDs stable.
|
|
23
23
|
|
|
24
|
-
NeoScript keywords are case-sensitive.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
NeoScript keywords are case-sensitive. Qualified member labels, schema keys,
|
|
25
|
+
registry entries, and enum options occupy their owner's namespace, so they may
|
|
26
|
+
reuse unrelated builtin names such as `Set`, `Dictionary`, `List`, or `Math`.
|
|
27
|
+
Type-token spellings such as `Set` and `Dictionary` are also legal parameters.
|
|
28
|
+
Actual lowercase grammar keywords such as `class` and `return` remain
|
|
29
|
+
reserved. Top-level declarations and bindings retain their own reservations:
|
|
30
|
+
for example, neither may shadow the unqualified builtin `Math` namespace, and
|
|
31
|
+
implicit bindings such as `this`, `root`, and `context` cannot be parameters.
|
|
28
32
|
|
|
29
33
|
```neo
|
|
30
34
|
@id("interface-named-id")
|
|
@@ -8,7 +8,7 @@ runtime ownership, evaluation, and migrations.
|
|
|
8
8
|
- Inline bodies and snippets
|
|
9
9
|
- Nullability and ownership
|
|
10
10
|
- Numeric builtins
|
|
11
|
-
-
|
|
11
|
+
- Conditional and logical operators
|
|
12
12
|
- Loops and transfer
|
|
13
13
|
- Switch
|
|
14
14
|
- Try/catch
|
|
@@ -44,6 +44,20 @@ Prefer `--json` for automation.
|
|
|
44
44
|
|
|
45
45
|
Inside an inline Class body, unqualified names resolve against that Class;
|
|
46
46
|
invoke delegate and action members directly with `Selector()` or `OnChanged()`.
|
|
47
|
+
Clear every subscribed listener from a stored action with
|
|
48
|
+
`this.OnChanged.Clear()`. `Clear()` is a mutating statement and follows the
|
|
49
|
+
action member's effective storage and writability.
|
|
50
|
+
|
|
51
|
+
Inline `NeoDelegate` lambdas may be returned or stored and may read surrounding
|
|
52
|
+
locals and parameters. Those values are captured when the lambda is created,
|
|
53
|
+
so later changes to the outer binding do not alter the closure. Explicit lambda
|
|
54
|
+
parameter annotations accept the same type grammar as declarations, including
|
|
55
|
+
`decimal`, generic parameters, collections, arrays, and nullable types.
|
|
56
|
+
|
|
57
|
+
Calling `Equals(other)` on a non-null generic value dynamically uses the
|
|
58
|
+
runtime Class's one-argument `Equals` Function or NSFunction when it returns
|
|
59
|
+
`bool`, including the effective override. Values without that member fall back
|
|
60
|
+
to ordinary NeoScript equality.
|
|
47
61
|
|
|
48
62
|
## Nullability and ownership
|
|
49
63
|
|
|
@@ -108,10 +122,22 @@ language's `float`-to-`int` conversions: they return `int` for `int` and
|
|
|
108
122
|
at runtime. `Round` rounds midpoints to even, matching `decimal.Round(0)`.
|
|
109
123
|
`Sign` always returns `int`; `Sqrt` takes `int` or `float` only.
|
|
110
124
|
|
|
111
|
-
`Math` is
|
|
112
|
-
|
|
125
|
+
`Math` is an unqualified builtin qualifier, never a type or value, so no Class,
|
|
126
|
+
enum, parameter, or local may shadow it. Qualified members use their owner's
|
|
127
|
+
namespace and may be named `Math`; access one as `this.Math` or
|
|
128
|
+
`SomeValue.Math` without colliding with the builtin qualifier.
|
|
129
|
+
|
|
130
|
+
## Conditional and logical operators
|
|
131
|
+
|
|
132
|
+
Use `condition ? whenTrue : whenFalse` for a value chosen by a condition:
|
|
133
|
+
|
|
134
|
+
```neo
|
|
135
|
+
T modified = this.Modifier != null ? this.Modifier(value) : value;
|
|
136
|
+
```
|
|
113
137
|
|
|
114
|
-
|
|
138
|
+
The operator has lower precedence than `??`, `||`, and `&&`, associates from
|
|
139
|
+
the right, and evaluates only the selected result arm. Both arms must share a
|
|
140
|
+
common assignable type or fit the surrounding expected type.
|
|
115
141
|
|
|
116
142
|
Use `&&` and `||` with C# precedence: `&&` binds tighter than `||`, and
|
|
117
143
|
parentheses preserve explicit grouping. Both operators short-circuit, so the
|