plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


c465715Peter John 2026-07-19T17:38:56+05:30
chore: remove old root src/ after workspace migration
Files changed (2) hide show
  1. Cargo.lock +913 -20
  2. src/main.rs +0 -58
Cargo.lock CHANGED
@@ -2,6 +2,21 @@
2
2
  # It is not intended for manual editing.
3
3
  version = 4
4
4
 
5
+ [[package]]
6
+ name = "addr2line"
7
+ version = "0.25.1"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
10
+ dependencies = [
11
+ "gimli",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "adler2"
16
+ version = "2.0.1"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
19
+
5
20
  [[package]]
6
21
  name = "aho-corasick"
7
22
  version = "1.1.3"
@@ -12,23 +27,389 @@ dependencies = [
12
27
  ]
13
28
 
14
29
  [[package]]
15
- name = "baz-tree-sitter-traversal"
30
+ name = "anstream"
16
- version = "0.1.4"
31
+ version = "1.0.0"
17
32
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "b2ae77a4ce9f364f49c87fdaf55d1ed79fb301003788acd26b64a46bda8f2a62"
33
+ checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
19
34
  dependencies = [
35
+ "anstyle",
36
+ "anstyle-parse",
37
+ "anstyle-query",
20
- "tree-sitter",
38
+ "anstyle-wincon",
39
+ "colorchoice",
40
+ "is_terminal_polyfill",
41
+ "utf8parse",
42
+ ]
43
+
44
+ [[package]]
45
+ name = "anstyle"
46
+ version = "1.0.14"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
49
+
50
+ [[package]]
51
+ name = "anstyle-parse"
52
+ version = "1.0.0"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
55
+ dependencies = [
56
+ "utf8parse",
57
+ ]
58
+
59
+ [[package]]
60
+ name = "anstyle-query"
61
+ version = "1.1.5"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
64
+ dependencies = [
65
+ "windows-sys",
66
+ ]
67
+
68
+ [[package]]
69
+ name = "anstyle-wincon"
70
+ version = "3.0.11"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
73
+ dependencies = [
74
+ "anstyle",
75
+ "once_cell_polyfill",
76
+ "windows-sys",
21
77
  ]
22
78
 
79
+ [[package]]
80
+ name = "anyhow"
81
+ version = "1.0.104"
82
+ source = "registry+https://github.com/rust-lang/crates.io-index"
83
+ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
84
+
85
+ [[package]]
86
+ name = "backtrace"
87
+ version = "0.3.76"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
90
+ dependencies = [
91
+ "addr2line",
92
+ "cfg-if",
93
+ "libc",
94
+ "miniz_oxide",
95
+ "object",
96
+ "rustc-demangle",
97
+ "windows-link",
98
+ ]
99
+
100
+ [[package]]
101
+ name = "backtrace-ext"
102
+ version = "0.2.1"
103
+ source = "registry+https://github.com/rust-lang/crates.io-index"
104
+ checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50"
105
+ dependencies = [
106
+ "backtrace",
107
+ ]
108
+
109
+ [[package]]
110
+ name = "bitflags"
111
+ version = "2.13.1"
112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
113
+ checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
114
+
115
+ [[package]]
116
+ name = "bumpalo"
117
+ version = "3.20.3"
118
+ source = "registry+https://github.com/rust-lang/crates.io-index"
119
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
120
+
23
121
  [[package]]
24
122
  name = "cc"
25
- version = "1.2.5"
123
+ version = "1.3.0"
26
124
  source = "registry+https://github.com/rust-lang/crates.io-index"
27
- checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
125
+ checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"
28
126
  dependencies = [
127
+ "find-msvc-tools",
29
128
  "shlex",
30
129
  ]
31
130
 
131
+ [[package]]
132
+ name = "cfg-if"
133
+ version = "1.0.4"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
136
+
137
+ [[package]]
138
+ name = "clap"
139
+ version = "4.6.2"
140
+ source = "registry+https://github.com/rust-lang/crates.io-index"
141
+ checksum = "dd059f9da4f5c36b3787f65d38ccaab1cc315f07b01f89abc8359ee6a8205011"
142
+ dependencies = [
143
+ "clap_builder",
144
+ "clap_derive",
145
+ ]
146
+
147
+ [[package]]
148
+ name = "clap_builder"
149
+ version = "4.6.2"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b"
152
+ dependencies = [
153
+ "anstream",
154
+ "anstyle",
155
+ "clap_lex",
156
+ "strsim",
157
+ ]
158
+
159
+ [[package]]
160
+ name = "clap_derive"
161
+ version = "4.6.1"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"
164
+ dependencies = [
165
+ "heck",
166
+ "proc-macro2",
167
+ "quote",
168
+ "syn 2.0.119",
169
+ ]
170
+
171
+ [[package]]
172
+ name = "clap_lex"
173
+ version = "1.1.0"
174
+ source = "registry+https://github.com/rust-lang/crates.io-index"
175
+ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
176
+
177
+ [[package]]
178
+ name = "colorchoice"
179
+ version = "1.0.5"
180
+ source = "registry+https://github.com/rust-lang/crates.io-index"
181
+ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
182
+
183
+ [[package]]
184
+ name = "crossbeam-deque"
185
+ version = "0.8.7"
186
+ source = "registry+https://github.com/rust-lang/crates.io-index"
187
+ checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb"
188
+ dependencies = [
189
+ "crossbeam-epoch",
190
+ "crossbeam-utils",
191
+ ]
192
+
193
+ [[package]]
194
+ name = "crossbeam-epoch"
195
+ version = "0.9.20"
196
+ source = "registry+https://github.com/rust-lang/crates.io-index"
197
+ checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
198
+ dependencies = [
199
+ "crossbeam-utils",
200
+ ]
201
+
202
+ [[package]]
203
+ name = "crossbeam-utils"
204
+ version = "0.8.22"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
207
+
208
+ [[package]]
209
+ name = "diff"
210
+ version = "0.1.13"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
213
+
214
+ [[package]]
215
+ name = "either"
216
+ version = "1.16.0"
217
+ source = "registry+https://github.com/rust-lang/crates.io-index"
218
+ checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
219
+
220
+ [[package]]
221
+ name = "equivalent"
222
+ version = "1.0.2"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
225
+
226
+ [[package]]
227
+ name = "errno"
228
+ version = "0.3.14"
229
+ source = "registry+https://github.com/rust-lang/crates.io-index"
230
+ checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
231
+ dependencies = [
232
+ "libc",
233
+ "windows-sys",
234
+ ]
235
+
236
+ [[package]]
237
+ name = "find-msvc-tools"
238
+ version = "0.1.9"
239
+ source = "registry+https://github.com/rust-lang/crates.io-index"
240
+ checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
241
+
242
+ [[package]]
243
+ name = "futures"
244
+ version = "0.3.33"
245
+ source = "registry+https://github.com/rust-lang/crates.io-index"
246
+ checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218"
247
+ dependencies = [
248
+ "futures-channel",
249
+ "futures-core",
250
+ "futures-executor",
251
+ "futures-io",
252
+ "futures-sink",
253
+ "futures-task",
254
+ "futures-util",
255
+ ]
256
+
257
+ [[package]]
258
+ name = "futures-channel"
259
+ version = "0.3.33"
260
+ source = "registry+https://github.com/rust-lang/crates.io-index"
261
+ checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
262
+ dependencies = [
263
+ "futures-core",
264
+ "futures-sink",
265
+ ]
266
+
267
+ [[package]]
268
+ name = "futures-core"
269
+ version = "0.3.33"
270
+ source = "registry+https://github.com/rust-lang/crates.io-index"
271
+ checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
272
+
273
+ [[package]]
274
+ name = "futures-executor"
275
+ version = "0.3.33"
276
+ source = "registry+https://github.com/rust-lang/crates.io-index"
277
+ checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
278
+ dependencies = [
279
+ "futures-core",
280
+ "futures-task",
281
+ "futures-util",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "futures-io"
286
+ version = "0.3.33"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
289
+
290
+ [[package]]
291
+ name = "futures-macro"
292
+ version = "0.3.33"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
295
+ dependencies = [
296
+ "proc-macro2",
297
+ "quote",
298
+ "syn 2.0.119",
299
+ ]
300
+
301
+ [[package]]
302
+ name = "futures-sink"
303
+ version = "0.3.33"
304
+ source = "registry+https://github.com/rust-lang/crates.io-index"
305
+ checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
306
+
307
+ [[package]]
308
+ name = "futures-task"
309
+ version = "0.3.33"
310
+ source = "registry+https://github.com/rust-lang/crates.io-index"
311
+ checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
312
+
313
+ [[package]]
314
+ name = "futures-util"
315
+ version = "0.3.33"
316
+ source = "registry+https://github.com/rust-lang/crates.io-index"
317
+ checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
318
+ dependencies = [
319
+ "futures-channel",
320
+ "futures-core",
321
+ "futures-io",
322
+ "futures-macro",
323
+ "futures-sink",
324
+ "futures-task",
325
+ "memchr",
326
+ "pin-project-lite",
327
+ "slab",
328
+ ]
329
+
330
+ [[package]]
331
+ name = "gimli"
332
+ version = "0.32.3"
333
+ source = "registry+https://github.com/rust-lang/crates.io-index"
334
+ checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
335
+
336
+ [[package]]
337
+ name = "hashbrown"
338
+ version = "0.17.1"
339
+ source = "registry+https://github.com/rust-lang/crates.io-index"
340
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
341
+
342
+ [[package]]
343
+ name = "heck"
344
+ version = "0.5.0"
345
+ source = "registry+https://github.com/rust-lang/crates.io-index"
346
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
347
+
348
+ [[package]]
349
+ name = "indexmap"
350
+ version = "2.14.0"
351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
352
+ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
353
+ dependencies = [
354
+ "equivalent",
355
+ "hashbrown",
356
+ ]
357
+
358
+ [[package]]
359
+ name = "is_ci"
360
+ version = "1.2.0"
361
+ source = "registry+https://github.com/rust-lang/crates.io-index"
362
+ checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45"
363
+
364
+ [[package]]
365
+ name = "is_terminal_polyfill"
366
+ version = "1.70.2"
367
+ source = "registry+https://github.com/rust-lang/crates.io-index"
368
+ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
369
+
370
+ [[package]]
371
+ name = "itertools"
372
+ version = "0.11.0"
373
+ source = "registry+https://github.com/rust-lang/crates.io-index"
374
+ checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
375
+ dependencies = [
376
+ "either",
377
+ ]
378
+
379
+ [[package]]
380
+ name = "itoa"
381
+ version = "1.0.18"
382
+ source = "registry+https://github.com/rust-lang/crates.io-index"
383
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
384
+
385
+ [[package]]
386
+ name = "js-sys"
387
+ version = "0.3.77"
388
+ source = "registry+https://github.com/rust-lang/crates.io-index"
389
+ checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
390
+ dependencies = [
391
+ "once_cell",
392
+ "wasm-bindgen",
393
+ ]
394
+
395
+ [[package]]
396
+ name = "libc"
397
+ version = "0.2.186"
398
+ source = "registry+https://github.com/rust-lang/crates.io-index"
399
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
400
+
401
+ [[package]]
402
+ name = "linux-raw-sys"
403
+ version = "0.12.1"
404
+ source = "registry+https://github.com/rust-lang/crates.io-index"
405
+ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
406
+
407
+ [[package]]
408
+ name = "log"
409
+ version = "0.4.33"
410
+ source = "registry+https://github.com/rust-lang/crates.io-index"
411
+ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
412
+
32
413
  [[package]]
33
414
  name = "memchr"
34
415
  version = "2.7.4"
@@ -36,19 +417,158 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
36
417
  checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
37
418
 
38
419
  [[package]]
420
+ name = "miette"
421
+ version = "7.6.0"
422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
423
+ checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7"
424
+ dependencies = [
425
+ "backtrace",
426
+ "backtrace-ext",
427
+ "cfg-if",
428
+ "miette-derive",
429
+ "owo-colors",
430
+ "supports-color",
431
+ "supports-hyperlinks",
432
+ "supports-unicode",
433
+ "terminal_size",
434
+ "textwrap",
435
+ "unicode-width 0.1.14",
436
+ ]
437
+
438
+ [[package]]
439
+ name = "miette-derive"
440
+ version = "7.6.0"
441
+ source = "registry+https://github.com/rust-lang/crates.io-index"
442
+ checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b"
443
+ dependencies = [
444
+ "proc-macro2",
445
+ "quote",
446
+ "syn 2.0.119",
447
+ ]
448
+
449
+ [[package]]
450
+ name = "miniz_oxide"
451
+ version = "0.8.9"
452
+ source = "registry+https://github.com/rust-lang/crates.io-index"
453
+ checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
454
+ dependencies = [
455
+ "adler2",
456
+ ]
457
+
458
+ [[package]]
459
+ name = "object"
460
+ version = "0.37.3"
461
+ source = "registry+https://github.com/rust-lang/crates.io-index"
462
+ checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
463
+ dependencies = [
464
+ "memchr",
465
+ ]
466
+
467
+ [[package]]
468
+ name = "once_cell"
469
+ version = "1.21.4"
470
+ source = "registry+https://github.com/rust-lang/crates.io-index"
471
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
472
+
473
+ [[package]]
474
+ name = "once_cell_polyfill"
475
+ version = "1.70.2"
476
+ source = "registry+https://github.com/rust-lang/crates.io-index"
477
+ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
478
+
479
+ [[package]]
480
+ name = "owo-colors"
481
+ version = "4.3.0"
482
+ source = "registry+https://github.com/rust-lang/crates.io-index"
483
+ checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d"
484
+
485
+ [[package]]
486
+ name = "pin-project-lite"
487
+ version = "0.2.17"
488
+ source = "registry+https://github.com/rust-lang/crates.io-index"
489
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
490
+
491
+ [[package]]
39
- name = "plum"
492
+ name = "plum-cli"
493
+ version = "0.1.0"
494
+ dependencies = [
495
+ "anyhow",
496
+ "clap",
497
+ "plum-core",
498
+ ]
499
+
500
+ [[package]]
501
+ name = "plum-core"
40
502
  version = "0.1.0"
41
503
  dependencies = [
504
+ "topiary-core",
42
- "baz-tree-sitter-traversal",
505
+ "topiary-tree-sitter-facade",
43
506
  "tree-sitter",
44
507
  "tree-sitter-plum",
45
508
  ]
46
509
 
510
+ [[package]]
511
+ name = "pretty_assertions"
512
+ version = "1.4.1"
513
+ source = "registry+https://github.com/rust-lang/crates.io-index"
514
+ checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d"
515
+ dependencies = [
516
+ "diff",
517
+ "yansi",
518
+ ]
519
+
520
+ [[package]]
521
+ name = "prettydiff"
522
+ version = "0.8.1"
523
+ source = "registry+https://github.com/rust-lang/crates.io-index"
524
+ checksum = "b9a475bdea0881b8c65eb81f91fe53187b8522352a701b919c5a2c8a2f262808"
525
+ dependencies = [
526
+ "owo-colors",
527
+ ]
528
+
529
+ [[package]]
530
+ name = "proc-macro2"
531
+ version = "1.0.107"
532
+ source = "registry+https://github.com/rust-lang/crates.io-index"
533
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
534
+ dependencies = [
535
+ "unicode-ident",
536
+ ]
537
+
538
+ [[package]]
539
+ name = "quote"
540
+ version = "1.0.47"
541
+ source = "registry+https://github.com/rust-lang/crates.io-index"
542
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
543
+ dependencies = [
544
+ "proc-macro2",
545
+ ]
546
+
547
+ [[package]]
548
+ name = "rayon"
549
+ version = "1.12.0"
550
+ source = "registry+https://github.com/rust-lang/crates.io-index"
551
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
552
+ dependencies = [
553
+ "either",
554
+ "rayon-core",
555
+ ]
556
+
557
+ [[package]]
558
+ name = "rayon-core"
559
+ version = "1.13.0"
560
+ source = "registry+https://github.com/rust-lang/crates.io-index"
561
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
562
+ dependencies = [
563
+ "crossbeam-deque",
564
+ "crossbeam-utils",
565
+ ]
566
+
47
567
  [[package]]
48
568
  name = "regex"
49
- version = "1.11.1"
569
+ version = "1.13.1"
50
570
  source = "registry+https://github.com/rust-lang/crates.io-index"
51
- checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
571
+ checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
52
572
  dependencies = [
53
573
  "aho-corasick",
54
574
  "memchr",
@@ -58,9 +578,9 @@ dependencies = [
58
578
 
59
579
  [[package]]
60
580
  name = "regex-automata"
61
- version = "0.4.9"
581
+ version = "0.4.16"
62
582
  source = "registry+https://github.com/rust-lang/crates.io-index"
63
- checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
583
+ checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
64
584
  dependencies = [
65
585
  "aho-corasick",
66
586
  "memchr",
@@ -69,15 +589,90 @@ dependencies = [
69
589
 
70
590
  [[package]]
71
591
  name = "regex-syntax"
72
- version = "0.8.5"
592
+ version = "0.8.11"
73
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
74
- checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
594
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
595
+
596
+ [[package]]
597
+ name = "rustc-demangle"
598
+ version = "0.1.28"
599
+ source = "registry+https://github.com/rust-lang/crates.io-index"
600
+ checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
601
+
602
+ [[package]]
603
+ name = "rustix"
604
+ version = "1.1.4"
605
+ source = "registry+https://github.com/rust-lang/crates.io-index"
606
+ checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
607
+ dependencies = [
608
+ "bitflags",
609
+ "errno",
610
+ "libc",
611
+ "linux-raw-sys",
612
+ "windows-sys",
613
+ ]
614
+
615
+ [[package]]
616
+ name = "rustversion"
617
+ version = "1.0.23"
618
+ source = "registry+https://github.com/rust-lang/crates.io-index"
619
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
620
+
621
+ [[package]]
622
+ name = "serde"
623
+ version = "1.0.229"
624
+ source = "registry+https://github.com/rust-lang/crates.io-index"
625
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
626
+ dependencies = [
627
+ "serde_core",
628
+ "serde_derive",
629
+ ]
630
+
631
+ [[package]]
632
+ name = "serde_core"
633
+ version = "1.0.229"
634
+ source = "registry+https://github.com/rust-lang/crates.io-index"
635
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
636
+ dependencies = [
637
+ "serde_derive",
638
+ ]
639
+
640
+ [[package]]
641
+ name = "serde_derive"
642
+ version = "1.0.229"
643
+ source = "registry+https://github.com/rust-lang/crates.io-index"
644
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
645
+ dependencies = [
646
+ "proc-macro2",
647
+ "quote",
648
+ "syn 3.0.0",
649
+ ]
650
+
651
+ [[package]]
652
+ name = "serde_json"
653
+ version = "1.0.150"
654
+ source = "registry+https://github.com/rust-lang/crates.io-index"
655
+ checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
656
+ dependencies = [
657
+ "indexmap",
658
+ "itoa",
659
+ "memchr",
660
+ "serde",
661
+ "serde_core",
662
+ "zmij",
663
+ ]
75
664
 
76
665
  [[package]]
77
666
  name = "shlex"
78
- version = "1.3.0"
667
+ version = "2.0.1"
79
668
  source = "registry+https://github.com/rust-lang/crates.io-index"
669
+ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
670
+
671
+ [[package]]
672
+ name = "slab"
673
+ version = "0.4.12"
674
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
- checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
675
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
81
676
 
82
677
  [[package]]
83
678
  name = "streaming-iterator"
@@ -85,15 +680,176 @@ version = "0.1.9"
85
680
  source = "registry+https://github.com/rust-lang/crates.io-index"
86
681
  checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520"
87
682
 
683
+ [[package]]
684
+ name = "strsim"
685
+ version = "0.11.1"
686
+ source = "registry+https://github.com/rust-lang/crates.io-index"
687
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
688
+
689
+ [[package]]
690
+ name = "supports-color"
691
+ version = "3.0.2"
692
+ source = "registry+https://github.com/rust-lang/crates.io-index"
693
+ checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6"
694
+ dependencies = [
695
+ "is_ci",
696
+ ]
697
+
698
+ [[package]]
699
+ name = "supports-hyperlinks"
700
+ version = "3.2.0"
701
+ source = "registry+https://github.com/rust-lang/crates.io-index"
702
+ checksum = "e396b6523b11ccb83120b115a0b7366de372751aa6edf19844dfb13a6af97e91"
703
+
704
+ [[package]]
705
+ name = "supports-unicode"
706
+ version = "3.0.0"
707
+ source = "registry+https://github.com/rust-lang/crates.io-index"
708
+ checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2"
709
+
710
+ [[package]]
711
+ name = "syn"
712
+ version = "2.0.119"
713
+ source = "registry+https://github.com/rust-lang/crates.io-index"
714
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
715
+ dependencies = [
716
+ "proc-macro2",
717
+ "quote",
718
+ "unicode-ident",
719
+ ]
720
+
721
+ [[package]]
722
+ name = "syn"
723
+ version = "3.0.0"
724
+ source = "registry+https://github.com/rust-lang/crates.io-index"
725
+ checksum = "f2fac314a64dc9a36e61a9eb4261a5e9bbfbc922b27e518af97bc32b926cf967"
726
+ dependencies = [
727
+ "proc-macro2",
728
+ "quote",
729
+ "unicode-ident",
730
+ ]
731
+
732
+ [[package]]
733
+ name = "terminal_size"
734
+ version = "0.4.4"
735
+ source = "registry+https://github.com/rust-lang/crates.io-index"
736
+ checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874"
737
+ dependencies = [
738
+ "rustix",
739
+ "windows-sys",
740
+ ]
741
+
742
+ [[package]]
743
+ name = "textwrap"
744
+ version = "0.16.2"
745
+ source = "registry+https://github.com/rust-lang/crates.io-index"
746
+ checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057"
747
+ dependencies = [
748
+ "unicode-linebreak",
749
+ "unicode-width 0.2.2",
750
+ ]
751
+
752
+ [[package]]
753
+ name = "thiserror"
754
+ version = "2.0.19"
755
+ source = "registry+https://github.com/rust-lang/crates.io-index"
756
+ checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
757
+ dependencies = [
758
+ "thiserror-impl",
759
+ ]
760
+
761
+ [[package]]
762
+ name = "thiserror-impl"
763
+ version = "2.0.19"
764
+ source = "registry+https://github.com/rust-lang/crates.io-index"
765
+ checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
766
+ dependencies = [
767
+ "proc-macro2",
768
+ "quote",
769
+ "syn 3.0.0",
770
+ ]
771
+
772
+ [[package]]
773
+ name = "tokio"
774
+ version = "1.53.0"
775
+ source = "registry+https://github.com/rust-lang/crates.io-index"
776
+ checksum = "d988bcd52dbe076d3d46903332f58c912b87a2c49b1428419a5845154762ffee"
777
+ dependencies = [
778
+ "pin-project-lite",
779
+ "tokio-macros",
780
+ ]
781
+
782
+ [[package]]
783
+ name = "tokio-macros"
784
+ version = "2.7.1"
785
+ source = "registry+https://github.com/rust-lang/crates.io-index"
786
+ checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba"
787
+ dependencies = [
788
+ "proc-macro2",
789
+ "quote",
790
+ "syn 2.0.119",
791
+ ]
792
+
793
+ [[package]]
794
+ name = "topiary-core"
795
+ version = "0.7.3"
796
+ source = "registry+https://github.com/rust-lang/crates.io-index"
797
+ checksum = "89df094e19f103c5b8e120a1ffa30a6309daa10bef8d186e598a3df633e6a221"
798
+ dependencies = [
799
+ "futures",
800
+ "itertools",
801
+ "log",
802
+ "miette",
803
+ "pretty_assertions",
804
+ "prettydiff",
805
+ "rayon",
806
+ "serde",
807
+ "serde_json",
808
+ "streaming-iterator",
809
+ "thiserror",
810
+ "tokio",
811
+ "topiary-tree-sitter-facade",
812
+ "topiary-web-tree-sitter-sys",
813
+ "tree-sitter",
814
+ ]
815
+
816
+ [[package]]
817
+ name = "topiary-tree-sitter-facade"
818
+ version = "0.7.3"
819
+ source = "registry+https://github.com/rust-lang/crates.io-index"
820
+ checksum = "41b7f801962f0e1d022f78a46c6afa2d2158138a3955dbbd25bb92cc5ef61ddb"
821
+ dependencies = [
822
+ "js-sys",
823
+ "streaming-iterator",
824
+ "topiary-web-tree-sitter-sys",
825
+ "tree-sitter",
826
+ "tree-sitter-language",
827
+ "wasm-bindgen",
828
+ "web-sys",
829
+ ]
830
+
831
+ [[package]]
832
+ name = "topiary-web-tree-sitter-sys"
833
+ version = "0.7.3"
834
+ source = "registry+https://github.com/rust-lang/crates.io-index"
835
+ checksum = "c9877bfc1ad20d17e6da579911925768df2edd6e276300d660265940881d7b9d"
836
+ dependencies = [
837
+ "js-sys",
838
+ "wasm-bindgen",
839
+ "wasm-bindgen-futures",
840
+ "web-sys",
841
+ ]
842
+
88
843
  [[package]]
89
844
  name = "tree-sitter"
90
- version = "0.24.5"
845
+ version = "0.26.11"
91
846
  source = "registry+https://github.com/rust-lang/crates.io-index"
92
- checksum = "8ac95b18f0f727aaaa012bd5179a1916706ee3ed071920fdbda738750b0c0bf5"
847
+ checksum = "af1c71c1c4cc0920b20d6b0f6572e7682cd07a6a2faec71067a31fa394c586df"
93
848
  dependencies = [
94
849
  "cc",
95
850
  "regex",
96
851
  "regex-syntax",
852
+ "serde_json",
97
853
  "streaming-iterator",
98
854
  "tree-sitter-language",
99
855
  ]
@@ -107,9 +863,146 @@ checksum = "c199356c799a8945965bb5f2c55b2ad9d9aa7c4b4f6e587fe9dea0bc715e5f9c"
107
863
  [[package]]
108
864
  name = "tree-sitter-plum"
109
865
  version = "0.1.0"
110
- source = "registry+https://github.com/rust-lang/crates.io-index"
111
- checksum = "09aba615e0c63f018b1e09436d442ddbad3d69417fbeb1e369108445e6456682"
112
866
  dependencies = [
113
867
  "cc",
868
+ "tree-sitter",
114
869
  "tree-sitter-language",
115
870
  ]
871
+
872
+ [[package]]
873
+ name = "unicode-ident"
874
+ version = "1.0.24"
875
+ source = "registry+https://github.com/rust-lang/crates.io-index"
876
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
877
+
878
+ [[package]]
879
+ name = "unicode-linebreak"
880
+ version = "0.1.5"
881
+ source = "registry+https://github.com/rust-lang/crates.io-index"
882
+ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
883
+
884
+ [[package]]
885
+ name = "unicode-width"
886
+ version = "0.1.14"
887
+ source = "registry+https://github.com/rust-lang/crates.io-index"
888
+ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
889
+
890
+ [[package]]
891
+ name = "unicode-width"
892
+ version = "0.2.2"
893
+ source = "registry+https://github.com/rust-lang/crates.io-index"
894
+ checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
895
+
896
+ [[package]]
897
+ name = "utf8parse"
898
+ version = "0.2.2"
899
+ source = "registry+https://github.com/rust-lang/crates.io-index"
900
+ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
901
+
902
+ [[package]]
903
+ name = "wasm-bindgen"
904
+ version = "0.2.100"
905
+ source = "registry+https://github.com/rust-lang/crates.io-index"
906
+ checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
907
+ dependencies = [
908
+ "cfg-if",
909
+ "once_cell",
910
+ "rustversion",
911
+ "wasm-bindgen-macro",
912
+ ]
913
+
914
+ [[package]]
915
+ name = "wasm-bindgen-backend"
916
+ version = "0.2.100"
917
+ source = "registry+https://github.com/rust-lang/crates.io-index"
918
+ checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
919
+ dependencies = [
920
+ "bumpalo",
921
+ "log",
922
+ "proc-macro2",
923
+ "quote",
924
+ "syn 2.0.119",
925
+ "wasm-bindgen-shared",
926
+ ]
927
+
928
+ [[package]]
929
+ name = "wasm-bindgen-futures"
930
+ version = "0.4.50"
931
+ source = "registry+https://github.com/rust-lang/crates.io-index"
932
+ checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
933
+ dependencies = [
934
+ "cfg-if",
935
+ "js-sys",
936
+ "once_cell",
937
+ "wasm-bindgen",
938
+ "web-sys",
939
+ ]
940
+
941
+ [[package]]
942
+ name = "wasm-bindgen-macro"
943
+ version = "0.2.100"
944
+ source = "registry+https://github.com/rust-lang/crates.io-index"
945
+ checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
946
+ dependencies = [
947
+ "quote",
948
+ "wasm-bindgen-macro-support",
949
+ ]
950
+
951
+ [[package]]
952
+ name = "wasm-bindgen-macro-support"
953
+ version = "0.2.100"
954
+ source = "registry+https://github.com/rust-lang/crates.io-index"
955
+ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
956
+ dependencies = [
957
+ "proc-macro2",
958
+ "quote",
959
+ "syn 2.0.119",
960
+ "wasm-bindgen-backend",
961
+ "wasm-bindgen-shared",
962
+ ]
963
+
964
+ [[package]]
965
+ name = "wasm-bindgen-shared"
966
+ version = "0.2.100"
967
+ source = "registry+https://github.com/rust-lang/crates.io-index"
968
+ checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
969
+ dependencies = [
970
+ "unicode-ident",
971
+ ]
972
+
973
+ [[package]]
974
+ name = "web-sys"
975
+ version = "0.3.77"
976
+ source = "registry+https://github.com/rust-lang/crates.io-index"
977
+ checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
978
+ dependencies = [
979
+ "js-sys",
980
+ "wasm-bindgen",
981
+ ]
982
+
983
+ [[package]]
984
+ name = "windows-link"
985
+ version = "0.2.1"
986
+ source = "registry+https://github.com/rust-lang/crates.io-index"
987
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
988
+
989
+ [[package]]
990
+ name = "windows-sys"
991
+ version = "0.61.2"
992
+ source = "registry+https://github.com/rust-lang/crates.io-index"
993
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
994
+ dependencies = [
995
+ "windows-link",
996
+ ]
997
+
998
+ [[package]]
999
+ name = "yansi"
1000
+ version = "1.0.1"
1001
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1002
+ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
1003
+
1004
+ [[package]]
1005
+ name = "zmij"
1006
+ version = "1.0.23"
1007
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1008
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
src/main.rs DELETED
@@ -1,58 +0,0 @@
1
- use tree_sitter;
2
- use tree_sitter_plum;
3
-
4
- fn main() {
5
- let code = r#"
6
- module std
7
-
8
- import std/int
9
- import std/str
10
-
11
- PI = 3.14
12
- MSG = "Hello World"
13
- SUM = 1 + {{2 * 3} / 4}
14
- ENABLED = !False
15
-
16
- # Animal is a set of behavior of every animal species
17
- trait Animal =
18
- speak() -> Str
19
-
20
- # Cat is an animal that meows always
21
- type Cat(Animal, IToStr) =
22
- name: Str
23
- age: Int
24
-
25
- withName<Cat>(name: Str) -> Cat =
26
- Cat(name: name, age: self.age)
27
-
28
- withAge<Cat>(age: Int) -> Cat =
29
- Cat(name: self.name, age: age)
30
-
31
- speak<Cat>() -> Str =
32
- "meow"
33
-
34
- toStr<Cat>() -> Str =
35
- for i in 0..10
36
- printLn("delta")
37
- if dog > 1
38
- printLn("Hellow")
39
- else
40
- printLn("New")
41
- "Cat({self.name}, {self.age})"
42
-
43
- main() =
44
- printLn("Hello world")
45
-
46
- "#;
47
- let mut parser = tree_sitter::Parser::new();
48
- let language = tree_sitter_plum::LANGUAGE;
49
- parser
50
- .set_language(&language.into())
51
- .expect("Error loading plum parser");
52
- let tree = parser.parse(code, None).unwrap();
53
- assert!(!tree.root_node().has_error());
54
- let mut cursor = tree.root_node().walk();
55
- for item in tree.root_node().children(&mut cursor) {
56
- println!("kind:{} {}", item.kind(), item.to_sexp());
57
- }
58
- }