@shd101wyy/yo 0.1.26 → 0.1.28

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 (174) hide show
  1. package/.github/skills/yo-async-effects/SKILL.md +4 -4
  2. package/.github/skills/yo-async-effects/async-effects-recipes.md +34 -34
  3. package/.github/skills/yo-core-patterns/SKILL.md +1 -1
  4. package/.github/skills/yo-core-patterns/core-patterns-cheatsheet.md +29 -26
  5. package/.github/skills/yo-project-workflow/SKILL.md +6 -3
  6. package/.github/skills/yo-project-workflow/workflow-cheatsheet.md +36 -11
  7. package/.github/skills/yo-syntax/SKILL.md +7 -6
  8. package/.github/skills/yo-syntax/syntax-cheatsheet.md +225 -64
  9. package/.github/skills/yo-wasm-integration/wasm-integration-cheatsheet.md +3 -3
  10. package/README.md +10 -8
  11. package/out/cjs/index.cjs +553 -535
  12. package/out/cjs/yo-cli.cjs +685 -651
  13. package/out/cjs/yo-lsp.cjs +596 -569
  14. package/out/esm/index.mjs +396 -378
  15. package/out/types/src/env.d.ts +1 -0
  16. package/out/types/src/evaluator/calls/helper.d.ts +4 -2
  17. package/out/types/src/evaluator/types/synthesizer.d.ts +1 -0
  18. package/out/types/src/formatter.d.ts +11 -0
  19. package/out/types/src/lsp/formatting.d.ts +2 -0
  20. package/out/types/src/test-runner.d.ts +2 -0
  21. package/out/types/src/tests/formatter.test.d.ts +1 -0
  22. package/out/types/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +1 -1
  24. package/scripts/probe-parser-parity.ts +61 -0
  25. package/scripts/probe-yo-self-parser.sh +33 -0
  26. package/scripts/validate-yo-self-fmt.ts +184 -0
  27. package/std/alg/hash.yo +13 -21
  28. package/std/allocator.yo +25 -40
  29. package/std/async.yo +3 -7
  30. package/std/build.yo +105 -151
  31. package/std/cli/arg_parser.yo +184 -169
  32. package/std/collections/array_list.yo +350 -314
  33. package/std/collections/btree_map.yo +142 -131
  34. package/std/collections/deque.yo +132 -128
  35. package/std/collections/hash_map.yo +542 -566
  36. package/std/collections/hash_set.yo +623 -687
  37. package/std/collections/linked_list.yo +275 -293
  38. package/std/collections/ordered_map.yo +113 -85
  39. package/std/collections/priority_queue.yo +73 -73
  40. package/std/crypto/md5.yo +191 -95
  41. package/std/crypto/random.yo +56 -64
  42. package/std/crypto/sha256.yo +151 -107
  43. package/std/encoding/base64.yo +87 -81
  44. package/std/encoding/hex.yo +43 -50
  45. package/std/encoding/html.yo +56 -81
  46. package/std/encoding/html_char_utils.yo +7 -13
  47. package/std/encoding/html_entities.yo +2248 -2253
  48. package/std/encoding/json.yo +316 -224
  49. package/std/encoding/punycode.yo +86 -116
  50. package/std/encoding/toml.yo +67 -66
  51. package/std/encoding/utf16.yo +37 -44
  52. package/std/env.yo +62 -91
  53. package/std/error.yo +7 -15
  54. package/std/fmt/display.yo +5 -9
  55. package/std/fmt/index.yo +8 -14
  56. package/std/fmt/to_string.yo +330 -315
  57. package/std/fmt/writer.yo +58 -87
  58. package/std/fs/dir.yo +83 -102
  59. package/std/fs/file.yo +147 -180
  60. package/std/fs/metadata.yo +45 -78
  61. package/std/fs/temp.yo +55 -65
  62. package/std/fs/types.yo +27 -40
  63. package/std/fs/walker.yo +53 -68
  64. package/std/gc.yo +5 -8
  65. package/std/glob.yo +30 -43
  66. package/std/http/client.yo +107 -120
  67. package/std/http/http.yo +106 -96
  68. package/std/http/index.yo +4 -6
  69. package/std/imm/list.yo +88 -93
  70. package/std/imm/map.yo +528 -464
  71. package/std/imm/set.yo +52 -57
  72. package/std/imm/sorted_map.yo +340 -286
  73. package/std/imm/sorted_set.yo +57 -63
  74. package/std/imm/string.yo +404 -345
  75. package/std/imm/vec.yo +173 -181
  76. package/std/io/reader.yo +3 -6
  77. package/std/io/writer.yo +4 -8
  78. package/std/libc/assert.yo +5 -9
  79. package/std/libc/ctype.yo +32 -22
  80. package/std/libc/dirent.yo +26 -25
  81. package/std/libc/errno.yo +164 -90
  82. package/std/libc/fcntl.yo +52 -45
  83. package/std/libc/float.yo +66 -44
  84. package/std/libc/limits.yo +42 -33
  85. package/std/libc/math.yo +53 -82
  86. package/std/libc/signal.yo +72 -47
  87. package/std/libc/stdatomic.yo +217 -188
  88. package/std/libc/stdint.yo +5 -29
  89. package/std/libc/stdio.yo +5 -29
  90. package/std/libc/stdlib.yo +32 -39
  91. package/std/libc/string.yo +5 -23
  92. package/std/libc/sys/stat.yo +58 -56
  93. package/std/libc/time.yo +5 -19
  94. package/std/libc/unistd.yo +5 -20
  95. package/std/libc/wctype.yo +6 -9
  96. package/std/libc/windows.yo +26 -30
  97. package/std/log.yo +41 -55
  98. package/std/net/addr.yo +102 -97
  99. package/std/net/dns.yo +27 -28
  100. package/std/net/errors.yo +50 -49
  101. package/std/net/tcp.yo +113 -124
  102. package/std/net/udp.yo +55 -66
  103. package/std/os/env.yo +35 -33
  104. package/std/os/signal.yo +15 -25
  105. package/std/path.yo +276 -311
  106. package/std/prelude.yo +6304 -4315
  107. package/std/process/command.yo +87 -103
  108. package/std/process/index.yo +12 -31
  109. package/std/regex/compiler.yo +196 -95
  110. package/std/regex/flags.yo +58 -39
  111. package/std/regex/index.yo +157 -173
  112. package/std/regex/match.yo +20 -31
  113. package/std/regex/node.yo +134 -152
  114. package/std/regex/parser.yo +283 -259
  115. package/std/regex/unicode.yo +172 -202
  116. package/std/regex/vm.yo +155 -171
  117. package/std/string/index.yo +5 -7
  118. package/std/string/rune.yo +45 -55
  119. package/std/string/string.yo +937 -964
  120. package/std/string/string_builder.yo +94 -104
  121. package/std/string/unicode.yo +46 -64
  122. package/std/sync/channel.yo +72 -73
  123. package/std/sync/cond.yo +31 -36
  124. package/std/sync/mutex.yo +30 -32
  125. package/std/sync/once.yo +13 -16
  126. package/std/sync/rwlock.yo +26 -31
  127. package/std/sync/waitgroup.yo +20 -25
  128. package/std/sys/advise.yo +16 -24
  129. package/std/sys/bufio/buf_reader.yo +77 -93
  130. package/std/sys/bufio/buf_writer.yo +52 -65
  131. package/std/sys/clock.yo +4 -9
  132. package/std/sys/constants.yo +77 -61
  133. package/std/sys/copy.yo +4 -10
  134. package/std/sys/dir.yo +26 -43
  135. package/std/sys/dns.yo +41 -61
  136. package/std/sys/errors.yo +95 -103
  137. package/std/sys/events.yo +45 -57
  138. package/std/sys/externs.yo +319 -267
  139. package/std/sys/fallocate.yo +7 -11
  140. package/std/sys/fcntl.yo +14 -22
  141. package/std/sys/file.yo +26 -40
  142. package/std/sys/future.yo +5 -8
  143. package/std/sys/iov.yo +12 -25
  144. package/std/sys/lock.yo +12 -13
  145. package/std/sys/mmap.yo +38 -43
  146. package/std/sys/path.yo +3 -8
  147. package/std/sys/perm.yo +7 -21
  148. package/std/sys/pipe.yo +5 -12
  149. package/std/sys/process.yo +23 -29
  150. package/std/sys/seek.yo +10 -12
  151. package/std/sys/signal.yo +7 -13
  152. package/std/sys/signals.yo +52 -35
  153. package/std/sys/socket.yo +63 -58
  154. package/std/sys/socketpair.yo +3 -6
  155. package/std/sys/sockinfo.yo +11 -20
  156. package/std/sys/statfs.yo +11 -34
  157. package/std/sys/statx.yo +25 -52
  158. package/std/sys/sysinfo.yo +15 -20
  159. package/std/sys/tcp.yo +62 -92
  160. package/std/sys/temp.yo +5 -9
  161. package/std/sys/time.yo +5 -15
  162. package/std/sys/timer.yo +6 -11
  163. package/std/sys/tty.yo +10 -18
  164. package/std/sys/udp.yo +22 -39
  165. package/std/sys/umask.yo +3 -6
  166. package/std/sys/unix.yo +33 -52
  167. package/std/testing/bench.yo +49 -52
  168. package/std/thread.yo +10 -15
  169. package/std/time/datetime.yo +105 -89
  170. package/std/time/duration.yo +43 -56
  171. package/std/time/instant.yo +13 -18
  172. package/std/time/sleep.yo +5 -9
  173. package/std/url/index.yo +184 -209
  174. package/std/worker.yo +6 -10
@@ -1,81 +1,70 @@
1
1
  //! Match result type — represents the result of a regex match,
2
2
  //! including the matched text, position, and captured groups.
3
-
4
- open import "std/collections/array_list";
5
- open import "std/string";
6
- { GroupNameEntry } :: import "./node.yo";
7
-
3
+ open(import("std/collections/array_list"));
4
+ open(import("std/string"));
5
+ { GroupNameEntry } :: import("./node.yo");
8
6
  /// A single regex match result.
9
7
  RegexMatch :: object(
10
- _value : String,
11
- _index : usize,
12
- _input : String,
13
- _groups : ArrayList(Option(String)),
8
+ _value : String,
9
+ _index : usize,
10
+ _input : String,
11
+ _groups : ArrayList(Option(String)),
14
12
  _group_names : ArrayList(GroupNameEntry)
15
13
  );
16
-
17
- impl(RegexMatch,
14
+ impl(
15
+ RegexMatch,
18
16
  // Create a match result
19
17
  new : (fn(value : String, index : usize, input : String, groups : ArrayList(Option(String)), group_names : ArrayList(GroupNameEntry)) -> Self)(
20
18
  Self(
21
- _value: value,
22
- _index: index,
23
- _input: input,
24
- _groups: groups,
25
- _group_names: group_names
19
+ _value : value,
20
+ _index : index,
21
+ _input : input,
22
+ _groups : groups,
23
+ _group_names : group_names
26
24
  )
27
25
  ),
28
-
29
26
  // Get the full matched text
30
27
  value : (fn(self : Self) -> String)(
31
28
  self._value
32
29
  ),
33
-
34
30
  // Get the start position (character index) of the match
35
31
  index : (fn(self : Self) -> usize)(
36
32
  self._index
37
33
  ),
38
-
39
34
  // Get the original input string
40
35
  input : (fn(self : Self) -> String)(
41
36
  self._input
42
37
  ),
43
-
44
38
  // Get capture group by index (1-based, group 0 is the full match)
45
39
  group : (fn(self : Self, idx : usize) -> Option(String))(
46
40
  cond(
47
- (idx == usize(0)) => .Some(self._value),
41
+ (idx == usize(0)) =>.Some(self._value),
48
42
  true => {
49
43
  actual_idx := (idx - usize(1));
50
44
  cond(
51
45
  (actual_idx < self._groups.len()) => self._groups.get(actual_idx).unwrap(),
52
- true => .None
46
+ true =>.None
53
47
  )
54
48
  }
55
49
  )
56
50
  ),
57
-
58
51
  // Get capture group by name
59
52
  named_group : (fn(self : Self, name : String) -> Option(String))({
60
53
  i := usize(0);
61
- while (i < self._group_names.len()), (i = (i + usize(1))), {
54
+ while(i < self._group_names.len(), i = (i + usize(1)), {
62
55
  entry := self._group_names.get(i).unwrap();
63
56
  cond(
64
57
  (entry.name == name) => {
65
- return self.group(entry.index);
58
+ return(self.group(entry.index));
66
59
  },
67
60
  true => ()
68
61
  );
69
- };
62
+ });
70
63
  .None
71
64
  }),
72
-
73
65
  // Get number of capture groups (not counting group 0)
74
66
  group_count : (fn(self : Self) -> usize)(
75
67
  self._groups.len()
76
68
  )
77
69
  );
78
-
79
- export
80
- RegexMatch
81
- ;
70
+ export(RegexMatch);
package/std/regex/node.yo CHANGED
@@ -3,16 +3,13 @@
3
3
  //! The parser produces a tree of `RegexNode` objects representing the
4
4
  //! structure of a regex pattern. Nodes are reference-counted objects
5
5
  //! since they form a recursive tree.
6
-
7
- open import "std/collections/array_list";
8
- open import "std/string";
9
-
6
+ open(import("std/collections/array_list"));
7
+ open(import("std/string"));
10
8
  /// A range of characters for character classes, e.g. `a`–`z`.
11
9
  CharRange :: struct(
12
- low : u32,
10
+ low : u32,
13
11
  high : u32
14
12
  );
15
-
16
13
  // Anchor types for ^ $ \b \B
17
14
  AnchorKind :: enum(
18
15
  Start,
@@ -20,7 +17,6 @@ AnchorKind :: enum(
20
17
  WordBoundary,
21
18
  NonWordBoundary
22
19
  );
23
-
24
20
  // Node kind tag
25
21
  NodeKind :: enum(
26
22
  Literal,
@@ -36,248 +32,234 @@ NodeKind :: enum(
36
32
  Lookahead,
37
33
  Lookbehind
38
34
  );
39
-
40
35
  // Entry mapping a named group to its index
41
36
  GroupNameEntry :: struct(
42
- name : String,
37
+ name : String,
43
38
  index : usize
44
39
  );
45
-
46
40
  // The regex AST node type.
47
41
  // Uses `object(...)` for reference counting since nodes are recursive.
48
42
  // Self-reference via `Self` (like LinkedList's Node).
49
43
  RegexNode :: object(
50
- kind : NodeKind,
44
+ kind : NodeKind,
51
45
  children : ArrayList(Self),
52
46
  // For Literal nodes: the codepoint
53
47
  codepoint : u32,
54
48
  // For CharClass nodes: ranges and negation flag
55
- ranges : ArrayList(CharRange),
56
- negated : bool,
49
+ ranges : ArrayList(CharRange),
50
+ negated : bool,
57
51
  // For Quantifier nodes: min, max, greedy
58
- q_min : usize,
59
- q_max : usize,
52
+ q_min : usize,
53
+ q_max : usize,
60
54
  q_greedy : bool,
61
55
  // For Group/Save nodes: group index
62
56
  group_index : usize,
63
57
  // For Anchor nodes
64
- anchor : AnchorKind
58
+ anchor : AnchorKind
65
59
  );
66
-
67
- impl(RegexNode,
60
+ impl(
61
+ RegexNode,
68
62
  // Create a literal node matching a single codepoint
69
63
  literal : (fn(cp : u32) -> Self)(
70
64
  Self(
71
- kind: .Literal,
72
- children: ArrayList(RegexNode).new(),
73
- codepoint: cp,
74
- ranges: ArrayList(CharRange).new(),
75
- negated: false,
76
- q_min: usize(0),
77
- q_max: usize(0),
78
- q_greedy: true,
79
- group_index: usize(0),
80
- anchor: .Start
65
+ kind :.Literal,
66
+ children : ArrayList(RegexNode).new(),
67
+ codepoint : cp,
68
+ ranges : ArrayList(CharRange).new(),
69
+ negated : false,
70
+ q_min : usize(0),
71
+ q_max : usize(0),
72
+ q_greedy : true,
73
+ group_index : usize(0),
74
+ anchor :.Start
81
75
  )
82
76
  ),
83
-
84
77
  // Create a dot (any char) node
85
78
  dot : (fn() -> Self)(
86
79
  Self(
87
- kind: .Dot,
88
- children: ArrayList(RegexNode).new(),
89
- codepoint: u32(0),
90
- ranges: ArrayList(CharRange).new(),
91
- negated: false,
92
- q_min: usize(0),
93
- q_max: usize(0),
94
- q_greedy: true,
95
- group_index: usize(0),
96
- anchor: .Start
80
+ kind :.Dot,
81
+ children : ArrayList(RegexNode).new(),
82
+ codepoint : u32(0),
83
+ ranges : ArrayList(CharRange).new(),
84
+ negated : false,
85
+ q_min : usize(0),
86
+ q_max : usize(0),
87
+ q_greedy : true,
88
+ group_index : usize(0),
89
+ anchor :.Start
97
90
  )
98
91
  ),
99
-
100
92
  // Create a character class node
101
93
  char_class : (fn(ranges : ArrayList(CharRange), negated : bool) -> Self)(
102
94
  Self(
103
- kind: .CharClass,
104
- children: ArrayList(RegexNode).new(),
105
- codepoint: u32(0),
106
- ranges: ranges,
107
- negated: negated,
108
- q_min: usize(0),
109
- q_max: usize(0),
110
- q_greedy: true,
111
- group_index: usize(0),
112
- anchor: .Start
95
+ kind :.CharClass,
96
+ children : ArrayList(RegexNode).new(),
97
+ codepoint : u32(0),
98
+ ranges : ranges,
99
+ negated : negated,
100
+ q_min : usize(0),
101
+ q_max : usize(0),
102
+ q_greedy : true,
103
+ group_index : usize(0),
104
+ anchor :.Start
113
105
  )
114
106
  ),
115
-
116
107
  // Create an anchor node (^, $, \b, \B)
117
108
  anchor_node : (fn(kind : AnchorKind) -> Self)(
118
109
  Self(
119
- kind: .Anchor,
120
- children: ArrayList(RegexNode).new(),
121
- codepoint: u32(0),
122
- ranges: ArrayList(CharRange).new(),
123
- negated: false,
124
- q_min: usize(0),
125
- q_max: usize(0),
126
- q_greedy: true,
127
- group_index: usize(0),
128
- anchor: kind
110
+ kind :.Anchor,
111
+ children : ArrayList(RegexNode).new(),
112
+ codepoint : u32(0),
113
+ ranges : ArrayList(CharRange).new(),
114
+ negated : false,
115
+ q_min : usize(0),
116
+ q_max : usize(0),
117
+ q_greedy : true,
118
+ group_index : usize(0),
119
+ anchor : kind
129
120
  )
130
121
  ),
131
-
132
122
  // Create a sequence node (concatenation of children)
133
123
  sequence : (fn(nodes : ArrayList(RegexNode)) -> Self)(
134
124
  Self(
135
- kind: .Sequence,
136
- children: nodes,
137
- codepoint: u32(0),
138
- ranges: ArrayList(CharRange).new(),
139
- negated: false,
140
- q_min: usize(0),
141
- q_max: usize(0),
142
- q_greedy: true,
143
- group_index: usize(0),
144
- anchor: .Start
125
+ kind :.Sequence,
126
+ children : nodes,
127
+ codepoint : u32(0),
128
+ ranges : ArrayList(CharRange).new(),
129
+ negated : false,
130
+ q_min : usize(0),
131
+ q_max : usize(0),
132
+ q_greedy : true,
133
+ group_index : usize(0),
134
+ anchor :.Start
145
135
  )
146
136
  ),
147
-
148
137
  // Create an alternation node (left | right)
149
138
  alternation : (fn(left : RegexNode, right : RegexNode) -> Self)({
150
139
  kids := ArrayList(RegexNode).new();
151
140
  kids.push(left);
152
141
  kids.push(right);
153
142
  Self(
154
- kind: .Alternation,
155
- children: kids,
156
- codepoint: u32(0),
157
- ranges: ArrayList(CharRange).new(),
158
- negated: false,
159
- q_min: usize(0),
160
- q_max: usize(0),
161
- q_greedy: true,
162
- group_index: usize(0),
163
- anchor: .Start
143
+ kind :.Alternation,
144
+ children : kids,
145
+ codepoint : u32(0),
146
+ ranges : ArrayList(CharRange).new(),
147
+ negated : false,
148
+ q_min : usize(0),
149
+ q_max : usize(0),
150
+ q_greedy : true,
151
+ group_index : usize(0),
152
+ anchor :.Start
164
153
  )
165
154
  }),
166
-
167
155
  // Create a quantifier node (wrapping a child)
168
156
  // max_val of 0 means unbounded (infinity)
169
157
  quantifier : (fn(child : RegexNode, min_val : usize, max_val : usize, greedy : bool) -> Self)({
170
158
  kids := ArrayList(RegexNode).new();
171
159
  kids.push(child);
172
160
  Self(
173
- kind: .Quantifier,
174
- children: kids,
175
- codepoint: u32(0),
176
- ranges: ArrayList(CharRange).new(),
177
- negated: false,
178
- q_min: min_val,
179
- q_max: max_val,
180
- q_greedy: greedy,
181
- group_index: usize(0),
182
- anchor: .Start
161
+ kind :.Quantifier,
162
+ children : kids,
163
+ codepoint : u32(0),
164
+ ranges : ArrayList(CharRange).new(),
165
+ negated : false,
166
+ q_min : min_val,
167
+ q_max : max_val,
168
+ q_greedy : greedy,
169
+ group_index : usize(0),
170
+ anchor :.Start
183
171
  )
184
172
  }),
185
-
186
173
  // Create a capturing group node
187
174
  group : (fn(child : RegexNode, index : usize) -> Self)({
188
175
  kids := ArrayList(RegexNode).new();
189
176
  kids.push(child);
190
177
  Self(
191
- kind: .Group,
192
- children: kids,
193
- codepoint: u32(0),
194
- ranges: ArrayList(CharRange).new(),
195
- negated: false,
196
- q_min: usize(0),
197
- q_max: usize(0),
198
- q_greedy: true,
199
- group_index: index,
200
- anchor: .Start
178
+ kind :.Group,
179
+ children : kids,
180
+ codepoint : u32(0),
181
+ ranges : ArrayList(CharRange).new(),
182
+ negated : false,
183
+ q_min : usize(0),
184
+ q_max : usize(0),
185
+ q_greedy : true,
186
+ group_index : index,
187
+ anchor :.Start
201
188
  )
202
189
  }),
203
-
204
190
  // Create a non-capturing group node
205
191
  non_capturing_group : (fn(child : RegexNode) -> Self)({
206
192
  kids := ArrayList(RegexNode).new();
207
193
  kids.push(child);
208
194
  Self(
209
- kind: .NonCapturingGroup,
210
- children: kids,
211
- codepoint: u32(0),
212
- ranges: ArrayList(CharRange).new(),
213
- negated: false,
214
- q_min: usize(0),
215
- q_max: usize(0),
216
- q_greedy: true,
217
- group_index: usize(0),
218
- anchor: .Start
195
+ kind :.NonCapturingGroup,
196
+ children : kids,
197
+ codepoint : u32(0),
198
+ ranges : ArrayList(CharRange).new(),
199
+ negated : false,
200
+ q_min : usize(0),
201
+ q_max : usize(0),
202
+ q_greedy : true,
203
+ group_index : usize(0),
204
+ anchor :.Start
219
205
  )
220
206
  }),
221
-
222
207
  // Create a backreference node (\1, \k<name>)
223
208
  backreference : (fn(group_idx : usize) -> Self)(
224
209
  Self(
225
- kind: .Backreference,
226
- children: ArrayList(RegexNode).new(),
227
- codepoint: u32(0),
228
- ranges: ArrayList(CharRange).new(),
229
- negated: false,
230
- q_min: usize(0),
231
- q_max: usize(0),
232
- q_greedy: true,
233
- group_index: group_idx,
234
- anchor: .Start
210
+ kind :.Backreference,
211
+ children : ArrayList(RegexNode).new(),
212
+ codepoint : u32(0),
213
+ ranges : ArrayList(CharRange).new(),
214
+ negated : false,
215
+ q_min : usize(0),
216
+ q_max : usize(0),
217
+ q_greedy : true,
218
+ group_index : group_idx,
219
+ anchor :.Start
235
220
  )
236
221
  ),
237
-
238
222
  // Create a lookahead node (?=...) or (?!...)
239
223
  // negated=false means positive, negated=true means negative
240
224
  lookahead : (fn(child : RegexNode, positive : bool) -> Self)({
241
225
  kids := ArrayList(RegexNode).new();
242
226
  kids.push(child);
243
227
  Self(
244
- kind: .Lookahead,
245
- children: kids,
246
- codepoint: u32(0),
247
- ranges: ArrayList(CharRange).new(),
248
- negated: (!(positive)),
249
- q_min: usize(0),
250
- q_max: usize(0),
251
- q_greedy: true,
252
- group_index: usize(0),
253
- anchor: .Start
228
+ kind :.Lookahead,
229
+ children : kids,
230
+ codepoint : u32(0),
231
+ ranges : ArrayList(CharRange).new(),
232
+ negated : (!(positive)),
233
+ q_min : usize(0),
234
+ q_max : usize(0),
235
+ q_greedy : true,
236
+ group_index : usize(0),
237
+ anchor :.Start
254
238
  )
255
239
  }),
256
-
257
240
  // Create a lookbehind node (?<=...) or (?<!...)
258
241
  // negated=false means positive, negated=true means negative
259
242
  lookbehind : (fn(child : RegexNode, positive : bool) -> Self)({
260
243
  kids := ArrayList(RegexNode).new();
261
244
  kids.push(child);
262
245
  Self(
263
- kind: .Lookbehind,
264
- children: kids,
265
- codepoint: u32(0),
266
- ranges: ArrayList(CharRange).new(),
267
- negated: (!(positive)),
268
- q_min: usize(0),
269
- q_max: usize(0),
270
- q_greedy: true,
271
- group_index: usize(0),
272
- anchor: .Start
246
+ kind :.Lookbehind,
247
+ children : kids,
248
+ codepoint : u32(0),
249
+ ranges : ArrayList(CharRange).new(),
250
+ negated : (!(positive)),
251
+ q_min : usize(0),
252
+ q_max : usize(0),
253
+ q_greedy : true,
254
+ group_index : usize(0),
255
+ anchor :.Start
273
256
  )
274
257
  })
275
258
  );
276
-
277
- export
259
+ export(
278
260
  RegexNode,
279
261
  NodeKind,
280
262
  CharRange,
281
263
  AnchorKind,
282
264
  GroupNameEntry
283
- ;
265
+ );