nomen-lang 0.7.1 → 0.9.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.
Files changed (80) hide show
  1. package/audit_runtime.c +12 -2
  2. package/core/System/Arena.nm +8 -1
  3. package/core/System/Buffer.nm +397 -8
  4. package/core/System/ClassBuffer.nm +156 -0
  5. package/core/System/Controls/Alert.nm +326 -0
  6. package/core/System/Controls/App.nm +147 -0
  7. package/core/System/Controls/Button.nm +119 -1
  8. package/core/System/Controls/CheckBox.nm +25 -1
  9. package/core/System/Controls/ColorPicker.nm +307 -0
  10. package/core/System/Controls/ComboBox.nm +430 -0
  11. package/core/System/Controls/Container.nm +843 -9
  12. package/core/System/Controls/Control.nm +443 -0
  13. package/core/System/Controls/DatePicker.nm +288 -0
  14. package/core/System/Controls/Form.nm +70 -0
  15. package/core/System/Controls/GroupBox.nm +267 -0
  16. package/core/System/Controls/ImageView.nm +311 -0
  17. package/core/System/Controls/LevelIndicator.nm +305 -0
  18. package/core/System/Controls/ListView.nm +633 -0
  19. package/core/System/Controls/Menu.nm +428 -0
  20. package/core/System/Controls/NumberInput.nm +56 -0
  21. package/core/System/Controls/OtpInput.nm +50 -0
  22. package/core/System/Controls/OutlineView.nm +598 -0
  23. package/core/System/Controls/Pagination.nm +142 -0
  24. package/core/System/Controls/Popover.nm +296 -0
  25. package/core/System/Controls/Progress.nm +348 -0
  26. package/core/System/Controls/Radio.nm +292 -0
  27. package/core/System/Controls/Scrollable.nm +584 -0
  28. package/core/System/Controls/SearchField.nm +326 -0
  29. package/core/System/Controls/SecureField.nm +344 -0
  30. package/core/System/Controls/Segmented.nm +380 -0
  31. package/core/System/Controls/Select.nm +340 -0
  32. package/core/System/Controls/Separator.nm +198 -0
  33. package/core/System/Controls/Sheet.nm +329 -0
  34. package/core/System/Controls/Slider.nm +315 -0
  35. package/core/System/Controls/Spinner.nm +287 -0
  36. package/core/System/Controls/SplitView.nm +509 -0
  37. package/core/System/Controls/Stepper.nm +349 -0
  38. package/core/System/Controls/Switch.nm +259 -0
  39. package/core/System/Controls/Table.nm +833 -0
  40. package/core/System/Controls/Tabs.nm +500 -0
  41. package/core/System/Controls/Text.nm +108 -11
  42. package/core/System/Controls/TextBox.nm +113 -2
  43. package/core/System/Controls/TextView.nm +329 -0
  44. package/core/System/Controls/Toggle.nm +346 -0
  45. package/core/System/Controls/Toolbar.nm +501 -0
  46. package/core/System/Controls/Tooltip.nm +76 -0
  47. package/core/System/Controls/Window.nm +1548 -91
  48. package/core/System/LinkedList.nm +8 -1
  49. package/core/System/List.nm +97 -7
  50. package/core/System/Map.nm +191 -18
  51. package/core/System/Mutex.nm +4 -4
  52. package/core/System/Random.nm +3 -4
  53. package/core/System/Set.nm +101 -13
  54. package/core/System/StableList.nm +371 -0
  55. package/core/System/Stream/Directory.nm +2 -2
  56. package/core/System/Stream/File.nm +2 -2
  57. package/core/System/Stream/Http.nm +2 -2
  58. package/core/System/String.nm +10 -5
  59. package/core/System/StringBuilder.nm +213 -2
  60. package/core/System/Text/CharIndex.nm +9 -9
  61. package/core/System/Text/Json.nm +60 -46
  62. package/core/System/Text/JsonTree.nm +120 -92
  63. package/core/System/Text/Regex.nm +23 -18
  64. package/core/System/Text/Utf8.nm +5 -5
  65. package/core/System/float.nm +36 -22
  66. package/core/System/int.nm +80 -28
  67. package/core/System/int16.nm +11 -0
  68. package/core/System/int32.nm +11 -0
  69. package/core/System/int64.nm +11 -0
  70. package/core/System/int8.nm +11 -0
  71. package/core/System/uint.nm +11 -0
  72. package/core/System/uint16.nm +11 -0
  73. package/core/System/uint32.nm +11 -0
  74. package/core/System/uint64.nm +11 -0
  75. package/core/System/uint8.nm +11 -0
  76. package/core/docs/System/StringBuilder.md +6 -0
  77. package/core/docs/System/Text/JsonTree.md +3 -2
  78. package/dist/index.mjs +38332 -30604
  79. package/package.json +1 -1
  80. package/src/bench_loop.nm +9 -9
@@ -2,6 +2,17 @@
2
2
  * An 8-bit signed integer
3
3
  **/
4
4
  pub struct int8: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, int8 divisor: divisor != 0, out int8) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, int8 divisor: divisor != 0, out int8) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self as uint
7
18
  }
@@ -2,6 +2,17 @@
2
2
  * An unsigned integer
3
3
  **/
4
4
  pub struct uint: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, uint divisor: divisor != 0, out uint) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, uint divisor: divisor != 0, out uint) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self
7
18
  }
@@ -2,6 +2,17 @@
2
2
  * A 16-bit unsigned integer
3
3
  **/
4
4
  pub struct uint16: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, uint16 divisor: divisor != 0, out uint16) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, uint16 divisor: divisor != 0, out uint16) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self as uint
7
18
  }
@@ -2,6 +2,17 @@
2
2
  * A 32-bit unsigned integer
3
3
  **/
4
4
  pub struct uint32: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, uint32 divisor: divisor != 0, out uint32) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, uint32 divisor: divisor != 0, out uint32) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self as uint
7
18
  }
@@ -2,6 +2,17 @@
2
2
  * A 64-bit unsigned integer
3
3
  **/
4
4
  pub struct uint64: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, uint64 divisor: divisor != 0, out uint64) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, uint64 divisor: divisor != 0, out uint64) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self as uint
7
18
  }
@@ -2,6 +2,17 @@
2
2
  * An 8-bit unsigned integer
3
3
  **/
4
4
  pub struct uint8: Stringable, Hashable, Equatable {
5
+
6
+ // The divisor contract (SPEC, Division and Modulo by Zero): scalar
7
+ // arithmetic lowers natively, so these declarations are the contract
8
+ // signatures the checker enforces at every `/` and `%` site.
9
+ func #op_div = (self, uint8 divisor: divisor != 0, out uint8) {
10
+ return self / divisor
11
+ }
12
+
13
+ func #op_mod = (self, uint8 divisor: divisor != 0, out uint8) {
14
+ return self % divisor
15
+ }
5
16
  pub func hash = (self, out uint) {
6
17
  return self as uint
7
18
  }
@@ -8,5 +8,11 @@ A growable byte buffer for incrementally building strings (O(1) amortized append
8
8
 
9
9
  - `ensure(int needed)`
10
10
  - `append_char(char c)`
11
+ - `append_int(int n)`
12
+ - `append_float(float f)`
11
13
  - `append_string(string s)`
14
+ - `append(view string s)`
15
+ - `append(int n)`
16
+ - `append(float f)`
17
+ - `append(char c)`
12
18
  - `to_string() -> string`
@@ -2,12 +2,11 @@
2
2
 
3
3
  ## `struct JsonTree`
4
4
 
5
- A flat, buffer-backed pool of JSON tree nodes — the parsed representation `Json.parse` produces
5
+ A flat, pool-backed set of JSON tree nodes — the parsed representation `Json.parse` produces
6
6
 
7
7
  **Members:**
8
8
 
9
9
  - `alloc_node() -> int`
10
- - `free_text(int idx)`
11
10
  - `reset()`
12
11
  - `set_text(int idx, string text)`
13
12
  - `set_kind(int idx, int val)`
@@ -16,6 +15,8 @@ A flat, buffer-backed pool of JSON tree nodes — the parsed representation `Jso
16
15
  - `set_val(int idx, int val)`
17
16
  - `get_kind(int idx) -> int`
18
17
  - `get_text(int idx) -> string`
18
+ - `get_text_view(int idx) -> view string`
19
+ - `take_text(int idx, ref StringBuilder sb)`
19
20
  - `get_child(int idx) -> int`
20
21
  - `get_next(int idx) -> int`
21
22
  - `get_val(int idx) -> int`