@ts-graphviz/ast 0.0.0-pr956-20240225073457 → 0.0.0-pr956-20240225160253

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 (71) hide show
  1. package/CHANGELOG.md +291 -3
  2. package/lib/ast.cjs +25 -60
  3. package/lib/ast.js +25 -60
  4. package/package.json +43 -24
  5. package/src/ast.ts +0 -8
  6. package/src/builder/__snapshots__/create-element.test.ts.snap +0 -166
  7. package/src/builder/builder.test.ts +0 -36
  8. package/src/builder/builder.ts +0 -44
  9. package/src/builder/create-element.test.ts +0 -110
  10. package/src/builder/create-element.ts +0 -13
  11. package/src/builder/index.ts +0 -3
  12. package/src/builder/types.ts +0 -226
  13. package/src/dot-shim/index.ts +0 -2
  14. package/src/dot-shim/parser/__snapshots__/parse.test.ts.snap +0 -2613
  15. package/src/dot-shim/parser/dot.peggy +0 -396
  16. package/src/dot-shim/parser/index.ts +0 -1
  17. package/src/dot-shim/parser/parse.test.ts +0 -263
  18. package/src/dot-shim/parser/parse.ts +0 -121
  19. package/src/dot-shim/parser/peggy.options.json +0 -15
  20. package/src/dot-shim/printer/index.ts +0 -6
  21. package/src/dot-shim/printer/plugins/AttributeListPrintPlugin.ts +0 -22
  22. package/src/dot-shim/printer/plugins/AttributePrintPlugin.ts +0 -11
  23. package/src/dot-shim/printer/plugins/CommentPrintPlugin.ts +0 -40
  24. package/src/dot-shim/printer/plugins/DotPrintPlugin.ts +0 -12
  25. package/src/dot-shim/printer/plugins/EdgePrintPlugin.ts +0 -27
  26. package/src/dot-shim/printer/plugins/GraphPrintPlugin.ts +0 -32
  27. package/src/dot-shim/printer/plugins/LiteralPrintPlugin.ts +0 -24
  28. package/src/dot-shim/printer/plugins/NodePrintPlugin.ts +0 -24
  29. package/src/dot-shim/printer/plugins/NodeRefGroupPrintPlugin.ts +0 -17
  30. package/src/dot-shim/printer/plugins/NodeRefPrintPlugin.ts +0 -18
  31. package/src/dot-shim/printer/plugins/SubgraphPrintPlugin.ts +0 -27
  32. package/src/dot-shim/printer/plugins/index.ts +0 -26
  33. package/src/dot-shim/printer/plugins/utils/index.ts +0 -1
  34. package/src/dot-shim/printer/plugins/utils/tokens.ts +0 -51
  35. package/src/dot-shim/printer/printer.ts +0 -46
  36. package/src/dot-shim/printer/stringify.test.ts +0 -823
  37. package/src/dot-shim/printer/stringify.ts +0 -19
  38. package/src/dot-shim/printer/types.ts +0 -74
  39. package/src/model-shim/from-model/converter.ts +0 -43
  40. package/src/model-shim/from-model/from-model.ts +0 -19
  41. package/src/model-shim/from-model/index.ts +0 -3
  42. package/src/model-shim/from-model/plugins/AttributeListPlugin.ts +0 -19
  43. package/src/model-shim/from-model/plugins/EdgePlugin.ts +0 -140
  44. package/src/model-shim/from-model/plugins/GraphPlugin.ts +0 -36
  45. package/src/model-shim/from-model/plugins/NodePlugin.ts +0 -33
  46. package/src/model-shim/from-model/plugins/SubraphPlugin.ts +0 -28
  47. package/src/model-shim/from-model/plugins/index.ts +0 -13
  48. package/src/model-shim/from-model/plugins/utils/convert-attribute.ts +0 -47
  49. package/src/model-shim/from-model/plugins/utils/convert-cluster-children.ts +0 -44
  50. package/src/model-shim/from-model/plugins/utils/convert-comment.ts +0 -16
  51. package/src/model-shim/from-model/plugins/utils/index.ts +0 -3
  52. package/src/model-shim/from-model/types.ts +0 -62
  53. package/src/model-shim/index.ts +0 -2
  54. package/src/model-shim/to-model/converter.ts +0 -42
  55. package/src/model-shim/to-model/index.ts +0 -3
  56. package/src/model-shim/to-model/plugins/DotPlugin.ts +0 -25
  57. package/src/model-shim/to-model/plugins/EdgePlugin.ts +0 -26
  58. package/src/model-shim/to-model/plugins/GraphPlugin.ts +0 -15
  59. package/src/model-shim/to-model/plugins/NodePlugin.ts +0 -25
  60. package/src/model-shim/to-model/plugins/SubgraphPlugin.ts +0 -14
  61. package/src/model-shim/to-model/plugins/index.ts +0 -13
  62. package/src/model-shim/to-model/plugins/utils/apply-statments.ts +0 -96
  63. package/src/model-shim/to-model/plugins/utils/comment-holder.ts +0 -31
  64. package/src/model-shim/to-model/plugins/utils/convert-to-edge-target-tuple.ts +0 -21
  65. package/src/model-shim/to-model/to-model.test.ts +0 -34
  66. package/src/model-shim/to-model/to-model.ts +0 -16
  67. package/src/model-shim/to-model/types.ts +0 -71
  68. package/src/types.ts +0 -370
  69. package/tsconfig.json +0 -8
  70. package/typedoc.json +0 -4
  71. package/vite.config.ts +0 -22
@@ -1,2613 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`parse > AttributeList > edge 1`] = `
4
- {
5
- "children": [
6
- {
7
- "children": [],
8
- "key": {
9
- "children": [],
10
- "location": {
11
- "end": {
12
- "column": 16,
13
- "line": 3,
14
- "offset": 31,
15
- },
16
- "source": undefined,
17
- "start": {
18
- "column": 11,
19
- "line": 3,
20
- "offset": 26,
21
- },
22
- },
23
- "quoted": false,
24
- "type": "Literal",
25
- "value": "color",
26
- },
27
- "location": {
28
- "end": {
29
- "column": 21,
30
- "line": 3,
31
- "offset": 36,
32
- },
33
- "source": undefined,
34
- "start": {
35
- "column": 11,
36
- "line": 3,
37
- "offset": 26,
38
- },
39
- },
40
- "type": "Attribute",
41
- "value": {
42
- "children": [],
43
- "location": {
44
- "end": {
45
- "column": 20,
46
- "line": 3,
47
- "offset": 35,
48
- },
49
- "source": undefined,
50
- "start": {
51
- "column": 17,
52
- "line": 3,
53
- "offset": 32,
54
- },
55
- },
56
- "quoted": false,
57
- "type": "Literal",
58
- "value": "red",
59
- },
60
- },
61
- {
62
- "children": [],
63
- "key": {
64
- "children": [],
65
- "location": {
66
- "end": {
67
- "column": 16,
68
- "line": 4,
69
- "offset": 52,
70
- },
71
- "source": undefined,
72
- "start": {
73
- "column": 11,
74
- "line": 4,
75
- "offset": 47,
76
- },
77
- },
78
- "quoted": false,
79
- "type": "Literal",
80
- "value": "label",
81
- },
82
- "location": {
83
- "end": {
84
- "column": 37,
85
- "line": 4,
86
- "offset": 73,
87
- },
88
- "source": undefined,
89
- "start": {
90
- "column": 11,
91
- "line": 4,
92
- "offset": 47,
93
- },
94
- },
95
- "type": "Attribute",
96
- "value": {
97
- "children": [],
98
- "location": {
99
- "end": {
100
- "column": 36,
101
- "line": 4,
102
- "offset": 72,
103
- },
104
- "source": undefined,
105
- "start": {
106
- "column": 19,
107
- "line": 4,
108
- "offset": 55,
109
- },
110
- },
111
- "quoted": true,
112
- "type": "Literal",
113
- "value": "example example",
114
- },
115
- },
116
- ],
117
- "kind": "Edge",
118
- "location": {
119
- "end": {
120
- "column": 11,
121
- "line": 5,
122
- "offset": 84,
123
- },
124
- "source": undefined,
125
- "start": {
126
- "column": 9,
127
- "line": 2,
128
- "offset": 9,
129
- },
130
- },
131
- "type": "AttributeList",
132
- }
133
- `;
134
-
135
- exports[`parse > AttributeList > graph 1`] = `
136
- {
137
- "children": [
138
- {
139
- "children": [],
140
- "key": {
141
- "children": [],
142
- "location": {
143
- "end": {
144
- "column": 18,
145
- "line": 1,
146
- "offset": 17,
147
- },
148
- "source": undefined,
149
- "start": {
150
- "column": 9,
151
- "line": 1,
152
- "offset": 8,
153
- },
154
- },
155
- "quoted": false,
156
- "type": "Literal",
157
- "value": "fillcolor",
158
- },
159
- "location": {
160
- "end": {
161
- "column": 23,
162
- "line": 1,
163
- "offset": 22,
164
- },
165
- "source": undefined,
166
- "start": {
167
- "column": 9,
168
- "line": 1,
169
- "offset": 8,
170
- },
171
- },
172
- "type": "Attribute",
173
- "value": {
174
- "children": [],
175
- "location": {
176
- "end": {
177
- "column": 22,
178
- "line": 1,
179
- "offset": 21,
180
- },
181
- "source": undefined,
182
- "start": {
183
- "column": 19,
184
- "line": 1,
185
- "offset": 18,
186
- },
187
- },
188
- "quoted": false,
189
- "type": "Literal",
190
- "value": "red",
191
- },
192
- },
193
- {
194
- "children": [],
195
- "key": {
196
- "children": [],
197
- "location": {
198
- "end": {
199
- "column": 29,
200
- "line": 1,
201
- "offset": 28,
202
- },
203
- "source": undefined,
204
- "start": {
205
- "column": 24,
206
- "line": 1,
207
- "offset": 23,
208
- },
209
- },
210
- "quoted": false,
211
- "type": "Literal",
212
- "value": "label",
213
- },
214
- "location": {
215
- "end": {
216
- "column": 49,
217
- "line": 1,
218
- "offset": 48,
219
- },
220
- "source": undefined,
221
- "start": {
222
- "column": 24,
223
- "line": 1,
224
- "offset": 23,
225
- },
226
- },
227
- "type": "Attribute",
228
- "value": {
229
- "children": [],
230
- "location": {
231
- "end": {
232
- "column": 49,
233
- "line": 1,
234
- "offset": 48,
235
- },
236
- "source": undefined,
237
- "start": {
238
- "column": 32,
239
- "line": 1,
240
- "offset": 31,
241
- },
242
- },
243
- "quoted": true,
244
- "type": "Literal",
245
- "value": "example example",
246
- },
247
- },
248
- ],
249
- "kind": "Graph",
250
- "location": {
251
- "end": {
252
- "column": 51,
253
- "line": 1,
254
- "offset": 50,
255
- },
256
- "source": undefined,
257
- "start": {
258
- "column": 1,
259
- "line": 1,
260
- "offset": 0,
261
- },
262
- },
263
- "type": "AttributeList",
264
- }
265
- `;
266
-
267
- exports[`parse > AttributeList > node 1`] = `
268
- {
269
- "children": [
270
- {
271
- "children": [],
272
- "key": {
273
- "children": [],
274
- "location": {
275
- "end": {
276
- "column": 16,
277
- "line": 3,
278
- "offset": 31,
279
- },
280
- "source": undefined,
281
- "start": {
282
- "column": 11,
283
- "line": 3,
284
- "offset": 26,
285
- },
286
- },
287
- "quoted": false,
288
- "type": "Literal",
289
- "value": "style",
290
- },
291
- "location": {
292
- "end": {
293
- "column": 24,
294
- "line": 3,
295
- "offset": 39,
296
- },
297
- "source": undefined,
298
- "start": {
299
- "column": 11,
300
- "line": 3,
301
- "offset": 26,
302
- },
303
- },
304
- "type": "Attribute",
305
- "value": {
306
- "children": [],
307
- "location": {
308
- "end": {
309
- "column": 23,
310
- "line": 3,
311
- "offset": 38,
312
- },
313
- "source": undefined,
314
- "start": {
315
- "column": 17,
316
- "line": 3,
317
- "offset": 32,
318
- },
319
- },
320
- "quoted": false,
321
- "type": "Literal",
322
- "value": "filled",
323
- },
324
- },
325
- {
326
- "children": [],
327
- "key": {
328
- "children": [],
329
- "location": {
330
- "end": {
331
- "column": 16,
332
- "line": 4,
333
- "offset": 55,
334
- },
335
- "source": undefined,
336
- "start": {
337
- "column": 11,
338
- "line": 4,
339
- "offset": 50,
340
- },
341
- },
342
- "quoted": false,
343
- "type": "Literal",
344
- "value": "color",
345
- },
346
- "location": {
347
- "end": {
348
- "column": 27,
349
- "line": 4,
350
- "offset": 66,
351
- },
352
- "source": undefined,
353
- "start": {
354
- "column": 11,
355
- "line": 4,
356
- "offset": 50,
357
- },
358
- },
359
- "type": "Attribute",
360
- "value": {
361
- "children": [],
362
- "location": {
363
- "end": {
364
- "column": 26,
365
- "line": 4,
366
- "offset": 65,
367
- },
368
- "source": undefined,
369
- "start": {
370
- "column": 17,
371
- "line": 4,
372
- "offset": 56,
373
- },
374
- },
375
- "quoted": false,
376
- "type": "Literal",
377
- "value": "lightgrey",
378
- },
379
- },
380
- {
381
- "children": [],
382
- "key": {
383
- "children": [],
384
- "location": {
385
- "end": {
386
- "column": 16,
387
- "line": 5,
388
- "offset": 82,
389
- },
390
- "source": undefined,
391
- "start": {
392
- "column": 11,
393
- "line": 5,
394
- "offset": 77,
395
- },
396
- },
397
- "quoted": false,
398
- "type": "Literal",
399
- "value": "label",
400
- },
401
- "location": {
402
- "end": {
403
- "column": 32,
404
- "line": 5,
405
- "offset": 98,
406
- },
407
- "source": undefined,
408
- "start": {
409
- "column": 11,
410
- "line": 5,
411
- "offset": 77,
412
- },
413
- },
414
- "type": "Attribute",
415
- "value": {
416
- "children": [],
417
- "location": {
418
- "end": {
419
- "column": 31,
420
- "line": 5,
421
- "offset": 97,
422
- },
423
- "source": undefined,
424
- "start": {
425
- "column": 19,
426
- "line": 5,
427
- "offset": 85,
428
- },
429
- },
430
- "quoted": true,
431
- "type": "Literal",
432
- "value": "example #1",
433
- },
434
- },
435
- ],
436
- "kind": "Node",
437
- "location": {
438
- "end": {
439
- "column": 10,
440
- "line": 6,
441
- "offset": 108,
442
- },
443
- "source": undefined,
444
- "start": {
445
- "column": 9,
446
- "line": 2,
447
- "offset": 9,
448
- },
449
- },
450
- "type": "AttributeList",
451
- }
452
- `;
453
-
454
- exports[`parse > AttributeList > with comment 1`] = `
455
- {
456
- "children": [
457
- {
458
- "children": [],
459
- "kind": "Macro",
460
- "location": {
461
- "end": {
462
- "column": 1,
463
- "line": 4,
464
- "offset": 39,
465
- },
466
- "source": undefined,
467
- "start": {
468
- "column": 12,
469
- "line": 3,
470
- "offset": 27,
471
- },
472
- },
473
- "type": "Comment",
474
- "value": "comment 1",
475
- },
476
- {
477
- "children": [],
478
- "key": {
479
- "children": [],
480
- "location": {
481
- "end": {
482
- "column": 16,
483
- "line": 4,
484
- "offset": 54,
485
- },
486
- "source": undefined,
487
- "start": {
488
- "column": 11,
489
- "line": 4,
490
- "offset": 49,
491
- },
492
- },
493
- "quoted": false,
494
- "type": "Literal",
495
- "value": "style",
496
- },
497
- "location": {
498
- "end": {
499
- "column": 24,
500
- "line": 4,
501
- "offset": 62,
502
- },
503
- "source": undefined,
504
- "start": {
505
- "column": 11,
506
- "line": 4,
507
- "offset": 49,
508
- },
509
- },
510
- "type": "Attribute",
511
- "value": {
512
- "children": [],
513
- "location": {
514
- "end": {
515
- "column": 23,
516
- "line": 4,
517
- "offset": 61,
518
- },
519
- "source": undefined,
520
- "start": {
521
- "column": 17,
522
- "line": 4,
523
- "offset": 55,
524
- },
525
- },
526
- "quoted": false,
527
- "type": "Literal",
528
- "value": "filled",
529
- },
530
- },
531
- ],
532
- "kind": "Node",
533
- "location": {
534
- "end": {
535
- "column": 10,
536
- "line": 5,
537
- "offset": 72,
538
- },
539
- "source": undefined,
540
- "start": {
541
- "column": 9,
542
- "line": 2,
543
- "offset": 9,
544
- },
545
- },
546
- "type": "AttributeList",
547
- }
548
- `;
549
-
550
- exports[`parse > attribute > set HTMLLike value 1`] = `
551
- {
552
- "children": [],
553
- "key": {
554
- "children": [],
555
- "location": {
556
- "end": {
557
- "column": 14,
558
- "line": 2,
559
- "offset": 14,
560
- },
561
- "source": undefined,
562
- "start": {
563
- "column": 9,
564
- "line": 2,
565
- "offset": 9,
566
- },
567
- },
568
- "quoted": false,
569
- "type": "Literal",
570
- "value": "label",
571
- },
572
- "location": {
573
- "end": {
574
- "column": 10,
575
- "line": 10,
576
- "offset": 601,
577
- },
578
- "source": undefined,
579
- "start": {
580
- "column": 9,
581
- "line": 2,
582
- "offset": 9,
583
- },
584
- },
585
- "type": "Attribute",
586
- "value": {
587
- "children": [],
588
- "location": {
589
- "end": {
590
- "column": 10,
591
- "line": 10,
592
- "offset": 601,
593
- },
594
- "source": undefined,
595
- "start": {
596
- "column": 17,
597
- "line": 2,
598
- "offset": 17,
599
- },
600
- },
601
- "quoted": "html",
602
- "type": "Literal",
603
- "value": "
604
- <table border="0">
605
- <tr><td align="text">By default, td text is center-aligned</td></tr>
606
- <tr><td align="text">This td is left aligned<br align="left" /></td></tr>
607
- <tr><td align="text">this one centered<br align="center" /></td></tr>
608
- <tr><td align="text">and this one right aligned<br align="right" /><br align="right"/></td></tr>
609
- <tr><td align="text">The value of a closing<br align="left"/>&lt;br/&gt; tag<br align="center"/>refers to the preceeding text<br align="right"/></td></tr>
610
- </table>
611
- ",
612
- },
613
- }
614
- `;
615
-
616
- exports[`parse > attribute > set quoted value 1`] = `
617
- {
618
- "children": [],
619
- "key": {
620
- "children": [],
621
- "location": {
622
- "end": {
623
- "column": 6,
624
- "line": 1,
625
- "offset": 5,
626
- },
627
- "source": undefined,
628
- "start": {
629
- "column": 1,
630
- "line": 1,
631
- "offset": 0,
632
- },
633
- },
634
- "quoted": false,
635
- "type": "Literal",
636
- "value": "label",
637
- },
638
- "location": {
639
- "end": {
640
- "column": 22,
641
- "line": 1,
642
- "offset": 21,
643
- },
644
- "source": undefined,
645
- "start": {
646
- "column": 1,
647
- "line": 1,
648
- "offset": 0,
649
- },
650
- },
651
- "type": "Attribute",
652
- "value": {
653
- "children": [],
654
- "location": {
655
- "end": {
656
- "column": 21,
657
- "line": 1,
658
- "offset": 20,
659
- },
660
- "source": undefined,
661
- "start": {
662
- "column": 9,
663
- "line": 1,
664
- "offset": 8,
665
- },
666
- },
667
- "quoted": true,
668
- "type": "Literal",
669
- "value": "example #1",
670
- },
671
- }
672
- `;
673
-
674
- exports[`parse > attribute > set value 1`] = `
675
- {
676
- "children": [],
677
- "key": {
678
- "children": [],
679
- "location": {
680
- "end": {
681
- "column": 6,
682
- "line": 1,
683
- "offset": 5,
684
- },
685
- "source": undefined,
686
- "start": {
687
- "column": 1,
688
- "line": 1,
689
- "offset": 0,
690
- },
691
- },
692
- "quoted": false,
693
- "type": "Literal",
694
- "value": "style",
695
- },
696
- "location": {
697
- "end": {
698
- "column": 14,
699
- "line": 1,
700
- "offset": 13,
701
- },
702
- "source": undefined,
703
- "start": {
704
- "column": 1,
705
- "line": 1,
706
- "offset": 0,
707
- },
708
- },
709
- "type": "Attribute",
710
- "value": {
711
- "children": [],
712
- "location": {
713
- "end": {
714
- "column": 13,
715
- "line": 1,
716
- "offset": 12,
717
- },
718
- "source": undefined,
719
- "start": {
720
- "column": 7,
721
- "line": 1,
722
- "offset": 6,
723
- },
724
- },
725
- "quoted": false,
726
- "type": "Literal",
727
- "value": "filled",
728
- },
729
- }
730
- `;
731
-
732
- exports[`parse > cluster_statements > comments 1`] = `
733
- [
734
- {
735
- "children": [],
736
- "kind": "Slash",
737
- "location": {
738
- "end": {
739
- "column": 1,
740
- "line": 3,
741
- "offset": 21,
742
- },
743
- "source": undefined,
744
- "start": {
745
- "column": 9,
746
- "line": 2,
747
- "offset": 9,
748
- },
749
- },
750
- "type": "Comment",
751
- "value": "comment1",
752
- },
753
- {
754
- "children": [],
755
- "kind": "Slash",
756
- "location": {
757
- "end": {
758
- "column": 1,
759
- "line": 6,
760
- "offset": 62,
761
- },
762
- "source": undefined,
763
- "start": {
764
- "column": 9,
765
- "line": 4,
766
- "offset": 30,
767
- },
768
- },
769
- "type": "Comment",
770
- "value": "comment2
771
- comment2",
772
- },
773
- {
774
- "children": [],
775
- "kind": "Macro",
776
- "location": {
777
- "end": {
778
- "column": 1,
779
- "line": 8,
780
- "offset": 82,
781
- },
782
- "source": undefined,
783
- "start": {
784
- "column": 9,
785
- "line": 7,
786
- "offset": 71,
787
- },
788
- },
789
- "type": "Comment",
790
- "value": "comment3",
791
- },
792
- {
793
- "children": [],
794
- "kind": "Macro",
795
- "location": {
796
- "end": {
797
- "column": 1,
798
- "line": 11,
799
- "offset": 121,
800
- },
801
- "source": undefined,
802
- "start": {
803
- "column": 9,
804
- "line": 9,
805
- "offset": 91,
806
- },
807
- },
808
- "type": "Comment",
809
- "value": "comment4
810
- comment4",
811
- },
812
- {
813
- "children": [],
814
- "kind": "Block",
815
- "location": {
816
- "end": {
817
- "column": 24,
818
- "line": 11,
819
- "offset": 144,
820
- },
821
- "source": undefined,
822
- "start": {
823
- "column": 9,
824
- "line": 11,
825
- "offset": 129,
826
- },
827
- },
828
- "type": "Comment",
829
- "value": "comment 5",
830
- },
831
- ]
832
- `;
833
-
834
- exports[`parse > dot > with comments 1`] = `
835
- {
836
- "children": [
837
- {
838
- "children": [],
839
- "kind": "Block",
840
- "location": {
841
- "end": {
842
- "column": 24,
843
- "line": 2,
844
- "offset": 24,
845
- },
846
- "source": undefined,
847
- "start": {
848
- "column": 9,
849
- "line": 2,
850
- "offset": 9,
851
- },
852
- },
853
- "type": "Comment",
854
- "value": "comment1",
855
- },
856
- {
857
- "children": [],
858
- "directed": true,
859
- "location": {
860
- "end": {
861
- "column": 19,
862
- "line": 3,
863
- "offset": 43,
864
- },
865
- "source": undefined,
866
- "start": {
867
- "column": 9,
868
- "line": 3,
869
- "offset": 33,
870
- },
871
- },
872
- "strict": false,
873
- "type": "Graph",
874
- },
875
- {
876
- "children": [],
877
- "kind": "Block",
878
- "location": {
879
- "end": {
880
- "column": 24,
881
- "line": 4,
882
- "offset": 67,
883
- },
884
- "source": undefined,
885
- "start": {
886
- "column": 9,
887
- "line": 4,
888
- "offset": 52,
889
- },
890
- },
891
- "type": "Comment",
892
- "value": "comment2",
893
- },
894
- ],
895
- "location": {
896
- "end": {
897
- "column": 9,
898
- "line": 5,
899
- "offset": 76,
900
- },
901
- "source": undefined,
902
- "start": {
903
- "column": 9,
904
- "line": 2,
905
- "offset": 9,
906
- },
907
- },
908
- "type": "Dot",
909
- }
910
- `;
911
-
912
- exports[`parse > edge > digraph edge 1`] = `
913
- {
914
- "children": [],
915
- "location": {
916
- "end": {
917
- "column": 8,
918
- "line": 1,
919
- "offset": 7,
920
- },
921
- "source": undefined,
922
- "start": {
923
- "column": 1,
924
- "line": 1,
925
- "offset": 0,
926
- },
927
- },
928
- "targets": [
929
- {
930
- "children": [],
931
- "id": {
932
- "children": [],
933
- "location": {
934
- "end": {
935
- "column": 2,
936
- "line": 1,
937
- "offset": 1,
938
- },
939
- "source": undefined,
940
- "start": {
941
- "column": 1,
942
- "line": 1,
943
- "offset": 0,
944
- },
945
- },
946
- "quoted": false,
947
- "type": "Literal",
948
- "value": "a",
949
- },
950
- "location": {
951
- "end": {
952
- "column": 2,
953
- "line": 1,
954
- "offset": 1,
955
- },
956
- "source": undefined,
957
- "start": {
958
- "column": 1,
959
- "line": 1,
960
- "offset": 0,
961
- },
962
- },
963
- "type": "NodeRef",
964
- },
965
- {
966
- "children": [],
967
- "id": {
968
- "children": [],
969
- "location": {
970
- "end": {
971
- "column": 7,
972
- "line": 1,
973
- "offset": 6,
974
- },
975
- "source": undefined,
976
- "start": {
977
- "column": 6,
978
- "line": 1,
979
- "offset": 5,
980
- },
981
- },
982
- "quoted": false,
983
- "type": "Literal",
984
- "value": "b",
985
- },
986
- "location": {
987
- "end": {
988
- "column": 7,
989
- "line": 1,
990
- "offset": 6,
991
- },
992
- "source": undefined,
993
- "start": {
994
- "column": 6,
995
- "line": 1,
996
- "offset": 5,
997
- },
998
- },
999
- "type": "NodeRef",
1000
- },
1001
- ],
1002
- "type": "Edge",
1003
- }
1004
- `;
1005
-
1006
- exports[`parse > edge > edge with attributes 1`] = `
1007
- {
1008
- "children": [
1009
- {
1010
- "children": [],
1011
- "key": {
1012
- "children": [],
1013
- "location": {
1014
- "end": {
1015
- "column": 18,
1016
- "line": 3,
1017
- "offset": 37,
1018
- },
1019
- "source": undefined,
1020
- "start": {
1021
- "column": 13,
1022
- "line": 3,
1023
- "offset": 32,
1024
- },
1025
- },
1026
- "quoted": false,
1027
- "type": "Literal",
1028
- "value": "color",
1029
- },
1030
- "location": {
1031
- "end": {
1032
- "column": 29,
1033
- "line": 3,
1034
- "offset": 48,
1035
- },
1036
- "source": undefined,
1037
- "start": {
1038
- "column": 13,
1039
- "line": 3,
1040
- "offset": 32,
1041
- },
1042
- },
1043
- "type": "Attribute",
1044
- "value": {
1045
- "children": [],
1046
- "location": {
1047
- "end": {
1048
- "column": 28,
1049
- "line": 3,
1050
- "offset": 47,
1051
- },
1052
- "source": undefined,
1053
- "start": {
1054
- "column": 19,
1055
- "line": 3,
1056
- "offset": 38,
1057
- },
1058
- },
1059
- "quoted": false,
1060
- "type": "Literal",
1061
- "value": "lightgrey",
1062
- },
1063
- },
1064
- {
1065
- "children": [],
1066
- "key": {
1067
- "children": [],
1068
- "location": {
1069
- "end": {
1070
- "column": 18,
1071
- "line": 4,
1072
- "offset": 66,
1073
- },
1074
- "source": undefined,
1075
- "start": {
1076
- "column": 13,
1077
- "line": 4,
1078
- "offset": 61,
1079
- },
1080
- },
1081
- "quoted": false,
1082
- "type": "Literal",
1083
- "value": "label",
1084
- },
1085
- "location": {
1086
- "end": {
1087
- "column": 34,
1088
- "line": 4,
1089
- "offset": 82,
1090
- },
1091
- "source": undefined,
1092
- "start": {
1093
- "column": 13,
1094
- "line": 4,
1095
- "offset": 61,
1096
- },
1097
- },
1098
- "type": "Attribute",
1099
- "value": {
1100
- "children": [],
1101
- "location": {
1102
- "end": {
1103
- "column": 33,
1104
- "line": 4,
1105
- "offset": 81,
1106
- },
1107
- "source": undefined,
1108
- "start": {
1109
- "column": 21,
1110
- "line": 4,
1111
- "offset": 69,
1112
- },
1113
- },
1114
- "quoted": true,
1115
- "type": "Literal",
1116
- "value": "example #1",
1117
- },
1118
- },
1119
- ],
1120
- "location": {
1121
- "end": {
1122
- "column": 13,
1123
- "line": 5,
1124
- "offset": 95,
1125
- },
1126
- "source": undefined,
1127
- "start": {
1128
- "column": 11,
1129
- "line": 2,
1130
- "offset": 11,
1131
- },
1132
- },
1133
- "targets": [
1134
- {
1135
- "children": [],
1136
- "id": {
1137
- "children": [],
1138
- "location": {
1139
- "end": {
1140
- "column": 12,
1141
- "line": 2,
1142
- "offset": 12,
1143
- },
1144
- "source": undefined,
1145
- "start": {
1146
- "column": 11,
1147
- "line": 2,
1148
- "offset": 11,
1149
- },
1150
- },
1151
- "quoted": false,
1152
- "type": "Literal",
1153
- "value": "a",
1154
- },
1155
- "location": {
1156
- "end": {
1157
- "column": 12,
1158
- "line": 2,
1159
- "offset": 12,
1160
- },
1161
- "source": undefined,
1162
- "start": {
1163
- "column": 11,
1164
- "line": 2,
1165
- "offset": 11,
1166
- },
1167
- },
1168
- "type": "NodeRef",
1169
- },
1170
- {
1171
- "children": [],
1172
- "id": {
1173
- "children": [],
1174
- "location": {
1175
- "end": {
1176
- "column": 17,
1177
- "line": 2,
1178
- "offset": 17,
1179
- },
1180
- "source": undefined,
1181
- "start": {
1182
- "column": 16,
1183
- "line": 2,
1184
- "offset": 16,
1185
- },
1186
- },
1187
- "quoted": false,
1188
- "type": "Literal",
1189
- "value": "b",
1190
- },
1191
- "location": {
1192
- "end": {
1193
- "column": 17,
1194
- "line": 2,
1195
- "offset": 17,
1196
- },
1197
- "source": undefined,
1198
- "start": {
1199
- "column": 16,
1200
- "line": 2,
1201
- "offset": 16,
1202
- },
1203
- },
1204
- "type": "NodeRef",
1205
- },
1206
- ],
1207
- "type": "Edge",
1208
- }
1209
- `;
1210
-
1211
- exports[`parse > edge > edge with port 1`] = `
1212
- {
1213
- "children": [],
1214
- "location": {
1215
- "end": {
1216
- "column": 31,
1217
- "line": 1,
1218
- "offset": 30,
1219
- },
1220
- "source": undefined,
1221
- "start": {
1222
- "column": 1,
1223
- "line": 1,
1224
- "offset": 0,
1225
- },
1226
- },
1227
- "targets": [
1228
- {
1229
- "children": [],
1230
- "id": {
1231
- "children": [],
1232
- "location": {
1233
- "end": {
1234
- "column": 2,
1235
- "line": 1,
1236
- "offset": 1,
1237
- },
1238
- "source": undefined,
1239
- "start": {
1240
- "column": 1,
1241
- "line": 1,
1242
- "offset": 0,
1243
- },
1244
- },
1245
- "quoted": false,
1246
- "type": "Literal",
1247
- "value": "a",
1248
- },
1249
- "location": {
1250
- "end": {
1251
- "column": 5,
1252
- "line": 1,
1253
- "offset": 4,
1254
- },
1255
- "source": undefined,
1256
- "start": {
1257
- "column": 1,
1258
- "line": 1,
1259
- "offset": 0,
1260
- },
1261
- },
1262
- "port": {
1263
- "children": [],
1264
- "location": {
1265
- "end": {
1266
- "column": 5,
1267
- "line": 1,
1268
- "offset": 4,
1269
- },
1270
- "source": undefined,
1271
- "start": {
1272
- "column": 3,
1273
- "line": 1,
1274
- "offset": 2,
1275
- },
1276
- },
1277
- "quoted": false,
1278
- "type": "Literal",
1279
- "value": "p1",
1280
- },
1281
- "type": "NodeRef",
1282
- },
1283
- {
1284
- "children": [],
1285
- "id": {
1286
- "children": [],
1287
- "location": {
1288
- "end": {
1289
- "column": 10,
1290
- "line": 1,
1291
- "offset": 9,
1292
- },
1293
- "source": undefined,
1294
- "start": {
1295
- "column": 9,
1296
- "line": 1,
1297
- "offset": 8,
1298
- },
1299
- },
1300
- "quoted": false,
1301
- "type": "Literal",
1302
- "value": "b",
1303
- },
1304
- "location": {
1305
- "end": {
1306
- "column": 13,
1307
- "line": 1,
1308
- "offset": 12,
1309
- },
1310
- "source": undefined,
1311
- "start": {
1312
- "column": 9,
1313
- "line": 1,
1314
- "offset": 8,
1315
- },
1316
- },
1317
- "port": {
1318
- "children": [],
1319
- "location": {
1320
- "end": {
1321
- "column": 13,
1322
- "line": 1,
1323
- "offset": 12,
1324
- },
1325
- "source": undefined,
1326
- "start": {
1327
- "column": 11,
1328
- "line": 1,
1329
- "offset": 10,
1330
- },
1331
- },
1332
- "quoted": false,
1333
- "type": "Literal",
1334
- "value": "p2",
1335
- },
1336
- "type": "NodeRef",
1337
- },
1338
- {
1339
- "children": [],
1340
- "compass": {
1341
- "children": [],
1342
- "location": {
1343
- "end": {
1344
- "column": 23,
1345
- "line": 1,
1346
- "offset": 22,
1347
- },
1348
- "source": undefined,
1349
- "start": {
1350
- "column": 22,
1351
- "line": 1,
1352
- "offset": 21,
1353
- },
1354
- },
1355
- "quoted": false,
1356
- "type": "Literal",
1357
- "value": "w",
1358
- },
1359
- "id": {
1360
- "children": [],
1361
- "location": {
1362
- "end": {
1363
- "column": 18,
1364
- "line": 1,
1365
- "offset": 17,
1366
- },
1367
- "source": undefined,
1368
- "start": {
1369
- "column": 17,
1370
- "line": 1,
1371
- "offset": 16,
1372
- },
1373
- },
1374
- "quoted": false,
1375
- "type": "Literal",
1376
- "value": "c",
1377
- },
1378
- "location": {
1379
- "end": {
1380
- "column": 23,
1381
- "line": 1,
1382
- "offset": 22,
1383
- },
1384
- "source": undefined,
1385
- "start": {
1386
- "column": 17,
1387
- "line": 1,
1388
- "offset": 16,
1389
- },
1390
- },
1391
- "port": {
1392
- "children": [],
1393
- "location": {
1394
- "end": {
1395
- "column": 21,
1396
- "line": 1,
1397
- "offset": 20,
1398
- },
1399
- "source": undefined,
1400
- "start": {
1401
- "column": 19,
1402
- "line": 1,
1403
- "offset": 18,
1404
- },
1405
- },
1406
- "quoted": false,
1407
- "type": "Literal",
1408
- "value": "p3",
1409
- },
1410
- "type": "NodeRef",
1411
- },
1412
- {
1413
- "children": [],
1414
- "id": {
1415
- "children": [],
1416
- "location": {
1417
- "end": {
1418
- "column": 28,
1419
- "line": 1,
1420
- "offset": 27,
1421
- },
1422
- "source": undefined,
1423
- "start": {
1424
- "column": 27,
1425
- "line": 1,
1426
- "offset": 26,
1427
- },
1428
- },
1429
- "quoted": false,
1430
- "type": "Literal",
1431
- "value": "d",
1432
- },
1433
- "location": {
1434
- "end": {
1435
- "column": 30,
1436
- "line": 1,
1437
- "offset": 29,
1438
- },
1439
- "source": undefined,
1440
- "start": {
1441
- "column": 27,
1442
- "line": 1,
1443
- "offset": 26,
1444
- },
1445
- },
1446
- "port": {
1447
- "children": [],
1448
- "location": {
1449
- "end": {
1450
- "column": 30,
1451
- "line": 1,
1452
- "offset": 29,
1453
- },
1454
- "source": undefined,
1455
- "start": {
1456
- "column": 29,
1457
- "line": 1,
1458
- "offset": 28,
1459
- },
1460
- },
1461
- "quoted": false,
1462
- "type": "Literal",
1463
- "value": "w",
1464
- },
1465
- "type": "NodeRef",
1466
- },
1467
- ],
1468
- "type": "Edge",
1469
- }
1470
- `;
1471
-
1472
- exports[`parse > edge > graph edge 1`] = `
1473
- {
1474
- "children": [],
1475
- "location": {
1476
- "end": {
1477
- "column": 8,
1478
- "line": 1,
1479
- "offset": 7,
1480
- },
1481
- "source": undefined,
1482
- "start": {
1483
- "column": 1,
1484
- "line": 1,
1485
- "offset": 0,
1486
- },
1487
- },
1488
- "targets": [
1489
- {
1490
- "children": [],
1491
- "id": {
1492
- "children": [],
1493
- "location": {
1494
- "end": {
1495
- "column": 2,
1496
- "line": 1,
1497
- "offset": 1,
1498
- },
1499
- "source": undefined,
1500
- "start": {
1501
- "column": 1,
1502
- "line": 1,
1503
- "offset": 0,
1504
- },
1505
- },
1506
- "quoted": false,
1507
- "type": "Literal",
1508
- "value": "a",
1509
- },
1510
- "location": {
1511
- "end": {
1512
- "column": 2,
1513
- "line": 1,
1514
- "offset": 1,
1515
- },
1516
- "source": undefined,
1517
- "start": {
1518
- "column": 1,
1519
- "line": 1,
1520
- "offset": 0,
1521
- },
1522
- },
1523
- "type": "NodeRef",
1524
- },
1525
- {
1526
- "children": [],
1527
- "id": {
1528
- "children": [],
1529
- "location": {
1530
- "end": {
1531
- "column": 7,
1532
- "line": 1,
1533
- "offset": 6,
1534
- },
1535
- "source": undefined,
1536
- "start": {
1537
- "column": 6,
1538
- "line": 1,
1539
- "offset": 5,
1540
- },
1541
- },
1542
- "quoted": false,
1543
- "type": "Literal",
1544
- "value": "b",
1545
- },
1546
- "location": {
1547
- "end": {
1548
- "column": 7,
1549
- "line": 1,
1550
- "offset": 6,
1551
- },
1552
- "source": undefined,
1553
- "start": {
1554
- "column": 6,
1555
- "line": 1,
1556
- "offset": 5,
1557
- },
1558
- },
1559
- "type": "NodeRef",
1560
- },
1561
- ],
1562
- "type": "Edge",
1563
- }
1564
- `;
1565
-
1566
- exports[`parse > edge > grouped edge targets 1`] = `
1567
- {
1568
- "children": [],
1569
- "location": {
1570
- "end": {
1571
- "column": 22,
1572
- "line": 1,
1573
- "offset": 21,
1574
- },
1575
- "source": undefined,
1576
- "start": {
1577
- "column": 1,
1578
- "line": 1,
1579
- "offset": 0,
1580
- },
1581
- },
1582
- "targets": [
1583
- {
1584
- "children": [
1585
- {
1586
- "children": [],
1587
- "id": {
1588
- "children": [],
1589
- "location": {
1590
- "end": {
1591
- "column": 4,
1592
- "line": 1,
1593
- "offset": 3,
1594
- },
1595
- "source": undefined,
1596
- "start": {
1597
- "column": 2,
1598
- "line": 1,
1599
- "offset": 1,
1600
- },
1601
- },
1602
- "quoted": false,
1603
- "type": "Literal",
1604
- "value": "a1",
1605
- },
1606
- "location": {
1607
- "end": {
1608
- "column": 4,
1609
- "line": 1,
1610
- "offset": 3,
1611
- },
1612
- "source": undefined,
1613
- "start": {
1614
- "column": 2,
1615
- "line": 1,
1616
- "offset": 1,
1617
- },
1618
- },
1619
- "type": "NodeRef",
1620
- },
1621
- {
1622
- "children": [],
1623
- "id": {
1624
- "children": [],
1625
- "location": {
1626
- "end": {
1627
- "column": 8,
1628
- "line": 1,
1629
- "offset": 7,
1630
- },
1631
- "source": undefined,
1632
- "start": {
1633
- "column": 6,
1634
- "line": 1,
1635
- "offset": 5,
1636
- },
1637
- },
1638
- "quoted": false,
1639
- "type": "Literal",
1640
- "value": "a2",
1641
- },
1642
- "location": {
1643
- "end": {
1644
- "column": 8,
1645
- "line": 1,
1646
- "offset": 7,
1647
- },
1648
- "source": undefined,
1649
- "start": {
1650
- "column": 6,
1651
- "line": 1,
1652
- "offset": 5,
1653
- },
1654
- },
1655
- "type": "NodeRef",
1656
- },
1657
- ],
1658
- "location": {
1659
- "end": {
1660
- "column": 9,
1661
- "line": 1,
1662
- "offset": 8,
1663
- },
1664
- "source": undefined,
1665
- "start": {
1666
- "column": 1,
1667
- "line": 1,
1668
- "offset": 0,
1669
- },
1670
- },
1671
- "type": "NodeRefGroup",
1672
- },
1673
- {
1674
- "children": [
1675
- {
1676
- "children": [],
1677
- "id": {
1678
- "children": [],
1679
- "location": {
1680
- "end": {
1681
- "column": 16,
1682
- "line": 1,
1683
- "offset": 15,
1684
- },
1685
- "source": undefined,
1686
- "start": {
1687
- "column": 14,
1688
- "line": 1,
1689
- "offset": 13,
1690
- },
1691
- },
1692
- "quoted": false,
1693
- "type": "Literal",
1694
- "value": "b1",
1695
- },
1696
- "location": {
1697
- "end": {
1698
- "column": 16,
1699
- "line": 1,
1700
- "offset": 15,
1701
- },
1702
- "source": undefined,
1703
- "start": {
1704
- "column": 14,
1705
- "line": 1,
1706
- "offset": 13,
1707
- },
1708
- },
1709
- "type": "NodeRef",
1710
- },
1711
- {
1712
- "children": [],
1713
- "id": {
1714
- "children": [],
1715
- "location": {
1716
- "end": {
1717
- "column": 20,
1718
- "line": 1,
1719
- "offset": 19,
1720
- },
1721
- "source": undefined,
1722
- "start": {
1723
- "column": 18,
1724
- "line": 1,
1725
- "offset": 17,
1726
- },
1727
- },
1728
- "quoted": false,
1729
- "type": "Literal",
1730
- "value": "b2",
1731
- },
1732
- "location": {
1733
- "end": {
1734
- "column": 20,
1735
- "line": 1,
1736
- "offset": 19,
1737
- },
1738
- "source": undefined,
1739
- "start": {
1740
- "column": 18,
1741
- "line": 1,
1742
- "offset": 17,
1743
- },
1744
- },
1745
- "type": "NodeRef",
1746
- },
1747
- ],
1748
- "location": {
1749
- "end": {
1750
- "column": 21,
1751
- "line": 1,
1752
- "offset": 20,
1753
- },
1754
- "source": undefined,
1755
- "start": {
1756
- "column": 13,
1757
- "line": 1,
1758
- "offset": 12,
1759
- },
1760
- },
1761
- "type": "NodeRefGroup",
1762
- },
1763
- ],
1764
- "type": "Edge",
1765
- }
1766
- `;
1767
-
1768
- exports[`parse > edge > grouped ported edge targets 1`] = `
1769
- {
1770
- "children": [],
1771
- "location": {
1772
- "end": {
1773
- "column": 35,
1774
- "line": 1,
1775
- "offset": 34,
1776
- },
1777
- "source": undefined,
1778
- "start": {
1779
- "column": 1,
1780
- "line": 1,
1781
- "offset": 0,
1782
- },
1783
- },
1784
- "targets": [
1785
- {
1786
- "children": [
1787
- {
1788
- "children": [],
1789
- "id": {
1790
- "children": [],
1791
- "location": {
1792
- "end": {
1793
- "column": 4,
1794
- "line": 1,
1795
- "offset": 3,
1796
- },
1797
- "source": undefined,
1798
- "start": {
1799
- "column": 2,
1800
- "line": 1,
1801
- "offset": 1,
1802
- },
1803
- },
1804
- "quoted": false,
1805
- "type": "Literal",
1806
- "value": "a1",
1807
- },
1808
- "location": {
1809
- "end": {
1810
- "column": 7,
1811
- "line": 1,
1812
- "offset": 6,
1813
- },
1814
- "source": undefined,
1815
- "start": {
1816
- "column": 2,
1817
- "line": 1,
1818
- "offset": 1,
1819
- },
1820
- },
1821
- "port": {
1822
- "children": [],
1823
- "location": {
1824
- "end": {
1825
- "column": 7,
1826
- "line": 1,
1827
- "offset": 6,
1828
- },
1829
- "source": undefined,
1830
- "start": {
1831
- "column": 5,
1832
- "line": 1,
1833
- "offset": 4,
1834
- },
1835
- },
1836
- "quoted": false,
1837
- "type": "Literal",
1838
- "value": "p1",
1839
- },
1840
- "type": "NodeRef",
1841
- },
1842
- {
1843
- "children": [],
1844
- "compass": {
1845
- "children": [],
1846
- "location": {
1847
- "end": {
1848
- "column": 16,
1849
- "line": 1,
1850
- "offset": 15,
1851
- },
1852
- "source": undefined,
1853
- "start": {
1854
- "column": 15,
1855
- "line": 1,
1856
- "offset": 14,
1857
- },
1858
- },
1859
- "quoted": false,
1860
- "type": "Literal",
1861
- "value": "w",
1862
- },
1863
- "id": {
1864
- "children": [],
1865
- "location": {
1866
- "end": {
1867
- "column": 11,
1868
- "line": 1,
1869
- "offset": 10,
1870
- },
1871
- "source": undefined,
1872
- "start": {
1873
- "column": 9,
1874
- "line": 1,
1875
- "offset": 8,
1876
- },
1877
- },
1878
- "quoted": false,
1879
- "type": "Literal",
1880
- "value": "a2",
1881
- },
1882
- "location": {
1883
- "end": {
1884
- "column": 16,
1885
- "line": 1,
1886
- "offset": 15,
1887
- },
1888
- "source": undefined,
1889
- "start": {
1890
- "column": 9,
1891
- "line": 1,
1892
- "offset": 8,
1893
- },
1894
- },
1895
- "port": {
1896
- "children": [],
1897
- "location": {
1898
- "end": {
1899
- "column": 14,
1900
- "line": 1,
1901
- "offset": 13,
1902
- },
1903
- "source": undefined,
1904
- "start": {
1905
- "column": 12,
1906
- "line": 1,
1907
- "offset": 11,
1908
- },
1909
- },
1910
- "quoted": false,
1911
- "type": "Literal",
1912
- "value": "p2",
1913
- },
1914
- "type": "NodeRef",
1915
- },
1916
- ],
1917
- "location": {
1918
- "end": {
1919
- "column": 17,
1920
- "line": 1,
1921
- "offset": 16,
1922
- },
1923
- "source": undefined,
1924
- "start": {
1925
- "column": 1,
1926
- "line": 1,
1927
- "offset": 0,
1928
- },
1929
- },
1930
- "type": "NodeRefGroup",
1931
- },
1932
- {
1933
- "children": [
1934
- {
1935
- "children": [],
1936
- "id": {
1937
- "children": [],
1938
- "location": {
1939
- "end": {
1940
- "column": 24,
1941
- "line": 1,
1942
- "offset": 23,
1943
- },
1944
- "source": undefined,
1945
- "start": {
1946
- "column": 22,
1947
- "line": 1,
1948
- "offset": 21,
1949
- },
1950
- },
1951
- "quoted": false,
1952
- "type": "Literal",
1953
- "value": "b1",
1954
- },
1955
- "location": {
1956
- "end": {
1957
- "column": 26,
1958
- "line": 1,
1959
- "offset": 25,
1960
- },
1961
- "source": undefined,
1962
- "start": {
1963
- "column": 22,
1964
- "line": 1,
1965
- "offset": 21,
1966
- },
1967
- },
1968
- "port": {
1969
- "children": [],
1970
- "location": {
1971
- "end": {
1972
- "column": 26,
1973
- "line": 1,
1974
- "offset": 25,
1975
- },
1976
- "source": undefined,
1977
- "start": {
1978
- "column": 25,
1979
- "line": 1,
1980
- "offset": 24,
1981
- },
1982
- },
1983
- "quoted": false,
1984
- "type": "Literal",
1985
- "value": "e",
1986
- },
1987
- "type": "NodeRef",
1988
- },
1989
- {
1990
- "children": [],
1991
- "id": {
1992
- "children": [],
1993
- "location": {
1994
- "end": {
1995
- "column": 30,
1996
- "line": 1,
1997
- "offset": 29,
1998
- },
1999
- "source": undefined,
2000
- "start": {
2001
- "column": 28,
2002
- "line": 1,
2003
- "offset": 27,
2004
- },
2005
- },
2006
- "quoted": false,
2007
- "type": "Literal",
2008
- "value": "b2",
2009
- },
2010
- "location": {
2011
- "end": {
2012
- "column": 33,
2013
- "line": 1,
2014
- "offset": 32,
2015
- },
2016
- "source": undefined,
2017
- "start": {
2018
- "column": 28,
2019
- "line": 1,
2020
- "offset": 27,
2021
- },
2022
- },
2023
- "port": {
2024
- "children": [],
2025
- "location": {
2026
- "end": {
2027
- "column": 33,
2028
- "line": 1,
2029
- "offset": 32,
2030
- },
2031
- "source": undefined,
2032
- "start": {
2033
- "column": 31,
2034
- "line": 1,
2035
- "offset": 30,
2036
- },
2037
- },
2038
- "quoted": false,
2039
- "type": "Literal",
2040
- "value": "p3",
2041
- },
2042
- "type": "NodeRef",
2043
- },
2044
- ],
2045
- "location": {
2046
- "end": {
2047
- "column": 34,
2048
- "line": 1,
2049
- "offset": 33,
2050
- },
2051
- "source": undefined,
2052
- "start": {
2053
- "column": 21,
2054
- "line": 1,
2055
- "offset": 20,
2056
- },
2057
- },
2058
- "type": "NodeRefGroup",
2059
- },
2060
- ],
2061
- "type": "Edge",
2062
- }
2063
- `;
2064
-
2065
- exports[`parse > graph > anonymous digraph 1`] = `
2066
- {
2067
- "children": [],
2068
- "directed": true,
2069
- "location": {
2070
- "end": {
2071
- "column": 11,
2072
- "line": 1,
2073
- "offset": 10,
2074
- },
2075
- "source": undefined,
2076
- "start": {
2077
- "column": 1,
2078
- "line": 1,
2079
- "offset": 0,
2080
- },
2081
- },
2082
- "strict": false,
2083
- "type": "Graph",
2084
- }
2085
- `;
2086
-
2087
- exports[`parse > graph > digraph named test 1`] = `
2088
- {
2089
- "children": [],
2090
- "directed": true,
2091
- "id": {
2092
- "children": [],
2093
- "location": {
2094
- "end": {
2095
- "column": 13,
2096
- "line": 1,
2097
- "offset": 12,
2098
- },
2099
- "source": undefined,
2100
- "start": {
2101
- "column": 9,
2102
- "line": 1,
2103
- "offset": 8,
2104
- },
2105
- },
2106
- "quoted": false,
2107
- "type": "Literal",
2108
- "value": "test",
2109
- },
2110
- "location": {
2111
- "end": {
2112
- "column": 16,
2113
- "line": 1,
2114
- "offset": 15,
2115
- },
2116
- "source": undefined,
2117
- "start": {
2118
- "column": 1,
2119
- "line": 1,
2120
- "offset": 0,
2121
- },
2122
- },
2123
- "strict": false,
2124
- "type": "Graph",
2125
- }
2126
- `;
2127
-
2128
- exports[`parse > graph > digraph named test(quoted) 1`] = `
2129
- {
2130
- "children": [],
2131
- "directed": true,
2132
- "id": {
2133
- "children": [],
2134
- "location": {
2135
- "end": {
2136
- "column": 15,
2137
- "line": 1,
2138
- "offset": 14,
2139
- },
2140
- "source": undefined,
2141
- "start": {
2142
- "column": 9,
2143
- "line": 1,
2144
- "offset": 8,
2145
- },
2146
- },
2147
- "quoted": true,
2148
- "type": "Literal",
2149
- "value": "test",
2150
- },
2151
- "location": {
2152
- "end": {
2153
- "column": 18,
2154
- "line": 1,
2155
- "offset": 17,
2156
- },
2157
- "source": undefined,
2158
- "start": {
2159
- "column": 1,
2160
- "line": 1,
2161
- "offset": 0,
2162
- },
2163
- },
2164
- "strict": false,
2165
- "type": "Graph",
2166
- }
2167
- `;
2168
-
2169
- exports[`parse > graph > graph named test 1`] = `
2170
- {
2171
- "children": [],
2172
- "directed": false,
2173
- "id": {
2174
- "children": [],
2175
- "location": {
2176
- "end": {
2177
- "column": 11,
2178
- "line": 1,
2179
- "offset": 10,
2180
- },
2181
- "source": undefined,
2182
- "start": {
2183
- "column": 7,
2184
- "line": 1,
2185
- "offset": 6,
2186
- },
2187
- },
2188
- "quoted": false,
2189
- "type": "Literal",
2190
- "value": "test",
2191
- },
2192
- "location": {
2193
- "end": {
2194
- "column": 14,
2195
- "line": 1,
2196
- "offset": 13,
2197
- },
2198
- "source": undefined,
2199
- "start": {
2200
- "column": 1,
2201
- "line": 1,
2202
- "offset": 0,
2203
- },
2204
- },
2205
- "strict": false,
2206
- "type": "Graph",
2207
- }
2208
- `;
2209
-
2210
- exports[`parse > graph > strict digraph named test 1`] = `
2211
- {
2212
- "children": [],
2213
- "directed": true,
2214
- "id": {
2215
- "children": [],
2216
- "location": {
2217
- "end": {
2218
- "column": 20,
2219
- "line": 1,
2220
- "offset": 19,
2221
- },
2222
- "source": undefined,
2223
- "start": {
2224
- "column": 16,
2225
- "line": 1,
2226
- "offset": 15,
2227
- },
2228
- },
2229
- "quoted": false,
2230
- "type": "Literal",
2231
- "value": "test",
2232
- },
2233
- "location": {
2234
- "end": {
2235
- "column": 23,
2236
- "line": 1,
2237
- "offset": 22,
2238
- },
2239
- "source": undefined,
2240
- "start": {
2241
- "column": 1,
2242
- "line": 1,
2243
- "offset": 0,
2244
- },
2245
- },
2246
- "strict": true,
2247
- "type": "Graph",
2248
- }
2249
- `;
2250
-
2251
- exports[`parse > graph > strict graph named test 1`] = `
2252
- {
2253
- "children": [],
2254
- "directed": false,
2255
- "id": {
2256
- "children": [],
2257
- "location": {
2258
- "end": {
2259
- "column": 18,
2260
- "line": 1,
2261
- "offset": 17,
2262
- },
2263
- "source": undefined,
2264
- "start": {
2265
- "column": 14,
2266
- "line": 1,
2267
- "offset": 13,
2268
- },
2269
- },
2270
- "quoted": false,
2271
- "type": "Literal",
2272
- "value": "test",
2273
- },
2274
- "location": {
2275
- "end": {
2276
- "column": 21,
2277
- "line": 1,
2278
- "offset": 20,
2279
- },
2280
- "source": undefined,
2281
- "start": {
2282
- "column": 1,
2283
- "line": 1,
2284
- "offset": 0,
2285
- },
2286
- },
2287
- "strict": true,
2288
- "type": "Graph",
2289
- }
2290
- `;
2291
-
2292
- exports[`parse > node > node with attributes 1`] = `
2293
- {
2294
- "children": [
2295
- {
2296
- "children": [],
2297
- "key": {
2298
- "children": [],
2299
- "location": {
2300
- "end": {
2301
- "column": 18,
2302
- "line": 3,
2303
- "offset": 35,
2304
- },
2305
- "source": undefined,
2306
- "start": {
2307
- "column": 13,
2308
- "line": 3,
2309
- "offset": 30,
2310
- },
2311
- },
2312
- "quoted": false,
2313
- "type": "Literal",
2314
- "value": "style",
2315
- },
2316
- "location": {
2317
- "end": {
2318
- "column": 26,
2319
- "line": 3,
2320
- "offset": 43,
2321
- },
2322
- "source": undefined,
2323
- "start": {
2324
- "column": 13,
2325
- "line": 3,
2326
- "offset": 30,
2327
- },
2328
- },
2329
- "type": "Attribute",
2330
- "value": {
2331
- "children": [],
2332
- "location": {
2333
- "end": {
2334
- "column": 25,
2335
- "line": 3,
2336
- "offset": 42,
2337
- },
2338
- "source": undefined,
2339
- "start": {
2340
- "column": 19,
2341
- "line": 3,
2342
- "offset": 36,
2343
- },
2344
- },
2345
- "quoted": false,
2346
- "type": "Literal",
2347
- "value": "filled",
2348
- },
2349
- },
2350
- {
2351
- "children": [],
2352
- "key": {
2353
- "children": [],
2354
- "location": {
2355
- "end": {
2356
- "column": 18,
2357
- "line": 4,
2358
- "offset": 61,
2359
- },
2360
- "source": undefined,
2361
- "start": {
2362
- "column": 13,
2363
- "line": 4,
2364
- "offset": 56,
2365
- },
2366
- },
2367
- "quoted": false,
2368
- "type": "Literal",
2369
- "value": "color",
2370
- },
2371
- "location": {
2372
- "end": {
2373
- "column": 29,
2374
- "line": 4,
2375
- "offset": 72,
2376
- },
2377
- "source": undefined,
2378
- "start": {
2379
- "column": 13,
2380
- "line": 4,
2381
- "offset": 56,
2382
- },
2383
- },
2384
- "type": "Attribute",
2385
- "value": {
2386
- "children": [],
2387
- "location": {
2388
- "end": {
2389
- "column": 28,
2390
- "line": 4,
2391
- "offset": 71,
2392
- },
2393
- "source": undefined,
2394
- "start": {
2395
- "column": 19,
2396
- "line": 4,
2397
- "offset": 62,
2398
- },
2399
- },
2400
- "quoted": false,
2401
- "type": "Literal",
2402
- "value": "lightgrey",
2403
- },
2404
- },
2405
- {
2406
- "children": [],
2407
- "key": {
2408
- "children": [],
2409
- "location": {
2410
- "end": {
2411
- "column": 18,
2412
- "line": 5,
2413
- "offset": 90,
2414
- },
2415
- "source": undefined,
2416
- "start": {
2417
- "column": 13,
2418
- "line": 5,
2419
- "offset": 85,
2420
- },
2421
- },
2422
- "quoted": false,
2423
- "type": "Literal",
2424
- "value": "label",
2425
- },
2426
- "location": {
2427
- "end": {
2428
- "column": 34,
2429
- "line": 5,
2430
- "offset": 106,
2431
- },
2432
- "source": undefined,
2433
- "start": {
2434
- "column": 13,
2435
- "line": 5,
2436
- "offset": 85,
2437
- },
2438
- },
2439
- "type": "Attribute",
2440
- "value": {
2441
- "children": [],
2442
- "location": {
2443
- "end": {
2444
- "column": 33,
2445
- "line": 5,
2446
- "offset": 105,
2447
- },
2448
- "source": undefined,
2449
- "start": {
2450
- "column": 21,
2451
- "line": 5,
2452
- "offset": 93,
2453
- },
2454
- },
2455
- "quoted": true,
2456
- "type": "Literal",
2457
- "value": "example #1",
2458
- },
2459
- },
2460
- ],
2461
- "id": {
2462
- "children": [],
2463
- "location": {
2464
- "end": {
2465
- "column": 15,
2466
- "line": 2,
2467
- "offset": 15,
2468
- },
2469
- "source": undefined,
2470
- "start": {
2471
- "column": 11,
2472
- "line": 2,
2473
- "offset": 11,
2474
- },
2475
- },
2476
- "quoted": false,
2477
- "type": "Literal",
2478
- "value": "test",
2479
- },
2480
- "location": {
2481
- "end": {
2482
- "column": 13,
2483
- "line": 6,
2484
- "offset": 119,
2485
- },
2486
- "source": undefined,
2487
- "start": {
2488
- "column": 11,
2489
- "line": 2,
2490
- "offset": 11,
2491
- },
2492
- },
2493
- "type": "Node",
2494
- }
2495
- `;
2496
-
2497
- exports[`parse > node > simple node 1`] = `
2498
- {
2499
- "children": [],
2500
- "id": {
2501
- "children": [],
2502
- "location": {
2503
- "end": {
2504
- "column": 5,
2505
- "line": 1,
2506
- "offset": 4,
2507
- },
2508
- "source": undefined,
2509
- "start": {
2510
- "column": 1,
2511
- "line": 1,
2512
- "offset": 0,
2513
- },
2514
- },
2515
- "quoted": false,
2516
- "type": "Literal",
2517
- "value": "test",
2518
- },
2519
- "location": {
2520
- "end": {
2521
- "column": 6,
2522
- "line": 1,
2523
- "offset": 5,
2524
- },
2525
- "source": undefined,
2526
- "start": {
2527
- "column": 1,
2528
- "line": 1,
2529
- "offset": 0,
2530
- },
2531
- },
2532
- "type": "Node",
2533
- }
2534
- `;
2535
-
2536
- exports[`parse > subgraph > anonymous subgraph 1`] = `
2537
- {
2538
- "children": [],
2539
- "location": {
2540
- "end": {
2541
- "column": 12,
2542
- "line": 1,
2543
- "offset": 11,
2544
- },
2545
- "source": undefined,
2546
- "start": {
2547
- "column": 1,
2548
- "line": 1,
2549
- "offset": 0,
2550
- },
2551
- },
2552
- "type": "Subgraph",
2553
- }
2554
- `;
2555
-
2556
- exports[`parse > subgraph > named subgraph 1`] = `
2557
- {
2558
- "children": [],
2559
- "id": {
2560
- "children": [],
2561
- "location": {
2562
- "end": {
2563
- "column": 14,
2564
- "line": 1,
2565
- "offset": 13,
2566
- },
2567
- "source": undefined,
2568
- "start": {
2569
- "column": 10,
2570
- "line": 1,
2571
- "offset": 9,
2572
- },
2573
- },
2574
- "quoted": false,
2575
- "type": "Literal",
2576
- "value": "hoge",
2577
- },
2578
- "location": {
2579
- "end": {
2580
- "column": 17,
2581
- "line": 1,
2582
- "offset": 16,
2583
- },
2584
- "source": undefined,
2585
- "start": {
2586
- "column": 1,
2587
- "line": 1,
2588
- "offset": 0,
2589
- },
2590
- },
2591
- "type": "Subgraph",
2592
- }
2593
- `;
2594
-
2595
- exports[`parse > subgraph > no keyword anonymous 1`] = `
2596
- {
2597
- "children": [],
2598
- "location": {
2599
- "end": {
2600
- "column": 3,
2601
- "line": 1,
2602
- "offset": 2,
2603
- },
2604
- "source": undefined,
2605
- "start": {
2606
- "column": 1,
2607
- "line": 1,
2608
- "offset": 0,
2609
- },
2610
- },
2611
- "type": "Subgraph",
2612
- }
2613
- `;