@mermanjs/tree-sitter-mermaid 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CMakeLists.txt +44 -0
  2. package/LICENSE +22 -0
  3. package/Makefile +80 -0
  4. package/README.md +201 -0
  5. package/THIRD_PARTY_LICENSES/mermaid/LICENSE +21 -0
  6. package/THIRD_PARTY_LICENSES/monaqa-tree-sitter-mermaid/LICENSE +21 -0
  7. package/THIRD_PARTY_LICENSES/pappasam-tree-sitter-mermaid/LICENSE +21 -0
  8. package/THIRD_PARTY_LICENSES/singularity-tree-sitter-mermaid/LICENSE +22 -0
  9. package/THIRD_PARTY_LICENSES/tree-sitter/LICENSE +21 -0
  10. package/THIRD_PARTY_LICENSES/zenuml-core/LICENSE +21 -0
  11. package/THIRD_PARTY_NOTICES.md +47 -0
  12. package/binding.gyp +56 -0
  13. package/bindings/c/tree-sitter-mermaid.pc.in +10 -0
  14. package/bindings/c/tree_sitter/tree-sitter-mermaid.h +16 -0
  15. package/bindings/node/binding.cc +25 -0
  16. package/bindings/node/index.d.ts +5 -0
  17. package/bindings/node/index.js +10 -0
  18. package/grammar/families/architecture.js +361 -0
  19. package/grammar/families/block.js +370 -0
  20. package/grammar/families/c4.js +394 -0
  21. package/grammar/families/class.js +441 -0
  22. package/grammar/families/cynefin.js +127 -0
  23. package/grammar/families/entity-relationship.js +408 -0
  24. package/grammar/families/event-modeling.js +307 -0
  25. package/grammar/families/flowchart.js +690 -0
  26. package/grammar/families/gantt.js +445 -0
  27. package/grammar/families/git-graph.js +326 -0
  28. package/grammar/families/info.js +77 -0
  29. package/grammar/families/ishikawa.js +103 -0
  30. package/grammar/families/journey.js +221 -0
  31. package/grammar/families/kanban.js +264 -0
  32. package/grammar/families/mindmap.js +221 -0
  33. package/grammar/families/packet.js +108 -0
  34. package/grammar/families/pie.js +118 -0
  35. package/grammar/families/quadrant-chart.js +385 -0
  36. package/grammar/families/radar.js +286 -0
  37. package/grammar/families/railroad-abnf.js +124 -0
  38. package/grammar/families/railroad-ebnf.js +179 -0
  39. package/grammar/families/railroad-peg.js +128 -0
  40. package/grammar/families/railroad-shared.js +114 -0
  41. package/grammar/families/railroad.js +143 -0
  42. package/grammar/families/requirement.js +475 -0
  43. package/grammar/families/sankey.js +139 -0
  44. package/grammar/families/sequence.js +437 -0
  45. package/grammar/families/state.js +400 -0
  46. package/grammar/families/swimlane.js +25 -0
  47. package/grammar/families/timeline.js +251 -0
  48. package/grammar/families/tree-view.js +189 -0
  49. package/grammar/families/treemap.js +146 -0
  50. package/grammar/families/venn.js +256 -0
  51. package/grammar/families/wardley.js +530 -0
  52. package/grammar/families/xy-chart.js +460 -0
  53. package/grammar/families/zenuml.js +725 -0
  54. package/grammar/shared/common.js +78 -0
  55. package/grammar/shared/header.js +16 -0
  56. package/grammar/shared/indentation.js +22 -0
  57. package/grammar/shared/langium.js +166 -0
  58. package/grammar/shared/preamble.js +26 -0
  59. package/grammar.js +188 -0
  60. package/metadata/derivations.json +519 -0
  61. package/metadata/provenance.json +98 -0
  62. package/package.json +107 -0
  63. package/prebuilds/darwin-arm64/@mermanjs+tree-sitter-mermaid.node +0 -0
  64. package/prebuilds/darwin-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
  65. package/prebuilds/linux-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
  66. package/prebuilds/win32-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
  67. package/queries/helix/highlights.scm +960 -0
  68. package/queries/helix/indents.scm +45 -0
  69. package/queries/helix/injections.scm +15 -0
  70. package/queries/helix/locals.scm +134 -0
  71. package/queries/helix/textobjects.scm +264 -0
  72. package/queries/neovim/README.md +28 -0
  73. package/queries/neovim/brackets.scm +65 -0
  74. package/queries/neovim/folds.scm +53 -0
  75. package/queries/neovim/highlights.scm +121 -0
  76. package/queries/neovim/indents.scm +110 -0
  77. package/queries/neovim/injections.scm +86 -0
  78. package/queries/neovim/locals.scm +277 -0
  79. package/queries/neovim/outline.scm +117 -0
  80. package/queries/neovim/tags.scm +149 -0
  81. package/queries/neovim/textobjects.scm +97 -0
  82. package/queries/portable/highlights.scm +961 -0
  83. package/queries/portable/injections.scm +45 -0
  84. package/queries/portable/locals.scm +290 -0
  85. package/queries/portable/tags.scm +182 -0
  86. package/queries/zed/README.md +48 -0
  87. package/queries/zed/brackets.scm +111 -0
  88. package/queries/zed/highlights.scm +961 -0
  89. package/queries/zed/indents.scm +111 -0
  90. package/queries/zed/injections.scm +11 -0
  91. package/queries/zed/outline.scm +167 -0
  92. package/queries/zed/textobjects.scm +68 -0
  93. package/src/grammar.json +71138 -0
  94. package/src/node-types.json +34871 -0
  95. package/src/parser.c +321353 -0
  96. package/src/scanner.c +462 -0
  97. package/src/tree_sitter/alloc.h +54 -0
  98. package/src/tree_sitter/array.h +336 -0
  99. package/src/tree_sitter/parser.h +286 -0
  100. package/tree-sitter-mermaid.wasm +0 -0
  101. package/tree-sitter.json +40 -0
@@ -0,0 +1,960 @@
1
+ ; Helix 25.07.1 highlight profile. Keep capture names in the Helix theme scope vocabulary.
2
+
3
+ (diagram_keyword) @keyword
4
+ (comment) @comment
5
+ (directive) @attribute
6
+ (frontmatter_delimiter) @punctuation.special
7
+ (quoted_string) @string
8
+
9
+ ; Shared structured-family vocabulary.
10
+ (statement_keyword) @keyword
11
+
12
+ [
13
+ (langium_string)
14
+ (langium_line_text)
15
+ (langium_acc_descr_block_text)
16
+ ] @string
17
+
18
+ ; Architecture.
19
+ (architecture_group_statement
20
+ id: (architecture_identifier) @namespace)
21
+
22
+ (architecture_service_statement
23
+ id: (architecture_identifier) @variable)
24
+
25
+ (architecture_junction_statement
26
+ id: (architecture_identifier) @variable)
27
+
28
+ (architecture_parent_clause
29
+ parent: (architecture_identifier) @namespace)
30
+
31
+ (architecture_edge_endpoint
32
+ id: (architecture_identifier) @variable)
33
+
34
+ (architecture_alignment_statement
35
+ member: (architecture_identifier) @variable)
36
+
37
+ [
38
+ (architecture_alignment_direction)
39
+ (architecture_port_direction)
40
+ ] @constant
41
+
42
+ [
43
+ (architecture_arrowhead)
44
+ (architecture_group_modifier)
45
+ (architecture_plain_connector)
46
+ ] @operator
47
+
48
+ (architecture_titled_connector
49
+ "-" @operator)
50
+
51
+ (architecture_left_port
52
+ ":" @punctuation.delimiter)
53
+
54
+ (architecture_right_port
55
+ ":" @punctuation.delimiter)
56
+
57
+ (architecture_icon
58
+ "(" @punctuation.delimiter
59
+ ")" @punctuation.delimiter)
60
+
61
+ (architecture_title
62
+ "[" @punctuation.delimiter
63
+ "]" @punctuation.delimiter)
64
+
65
+ [
66
+ (architecture_quoted_string)
67
+ (architecture_unclosed_quoted_string)
68
+ (architecture_bare_title)
69
+ (architecture_line_text)
70
+ (architecture_accessibility_text)
71
+ ] @string
72
+
73
+ (architecture_icon_name) @string.special
74
+
75
+ ; Cynefin.
76
+ (cynefin_domain_name) @keyword
77
+ (cynefin_transition_operator) @operator
78
+
79
+ ; GitGraph.
80
+ (git_graph_statement_keyword) @keyword
81
+ (git_graph_clause_keyword) @variable.other.member
82
+
83
+ [
84
+ (git_graph_header_separator)
85
+ (git_graph_clause_separator)
86
+ ] @punctuation.delimiter
87
+
88
+ [
89
+ (git_graph_direction)
90
+ (git_graph_commit_type)
91
+ ] @constant
92
+
93
+ (git_graph_reference) @variable
94
+ (git_graph_integer) @constant.numeric
95
+
96
+ ; Packet.
97
+ [
98
+ (packet_range_operator)
99
+ (packet_width_operator)
100
+ ] @operator
101
+
102
+ (packet_label_delimiter) @punctuation.delimiter
103
+ (packet_integer) @constant.numeric
104
+
105
+ ; Pie.
106
+ (pie_show_data_option) @keyword
107
+ (pie_section_delimiter) @punctuation.delimiter
108
+ (pie_number) @constant.numeric
109
+
110
+ ; Radar.
111
+ (radar_axis
112
+ name: (radar_identifier) @variable)
113
+
114
+ (radar_curve
115
+ name: (radar_identifier) @function)
116
+
117
+ (radar_detailed_entry
118
+ axis: (radar_identifier) @variable)
119
+
120
+ (radar_option
121
+ name: (radar_option_name) @variable.other.member)
122
+
123
+ [
124
+ (radar_title_text)
125
+ (radar_accessibility_text)
126
+ (radar_accessibility_block)
127
+ ] @string
128
+
129
+ (radar_number) @constant.numeric
130
+ (radar_boolean) @constant.builtin.boolean
131
+ (radar_graticule) @constant
132
+
133
+ ; Wardley.
134
+ (wardley_component_statement
135
+ name: (wardley_name) @variable)
136
+
137
+ (wardley_anchor_statement
138
+ name: (wardley_name) @variable)
139
+
140
+ (wardley_link_statement
141
+ source: (wardley_name) @variable
142
+ target: (wardley_name) @variable)
143
+
144
+ (wardley_evolve_statement
145
+ component: (wardley_name) @variable)
146
+
147
+ (wardley_pipeline_statement
148
+ parent: (wardley_name) @variable)
149
+
150
+ (wardley_pipeline_component_statement
151
+ name: (wardley_name) @variable)
152
+
153
+ [
154
+ (wardley_arrow)
155
+ (wardley_link_operator)
156
+ (wardley_link_port)
157
+ ] @operator
158
+
159
+ (wardley_strategy) @constant
160
+
161
+ [
162
+ (wardley_title_text)
163
+ (wardley_accessibility_text)
164
+ (wardley_accessibility_block)
165
+ (wardley_link_label_value)
166
+ ] @string
167
+
168
+ [
169
+ (wardley_decimal)
170
+ (wardley_integer)
171
+ (wardley_signed_integer)
172
+ ] @constant.numeric
173
+
174
+ ; Gantt.
175
+ (gantt_task_status) @attribute
176
+ (gantt_constraint_keyword) @keyword.operator
177
+ (gantt_action_keyword) @keyword
178
+
179
+ [
180
+ (gantt_weekday)
181
+ (gantt_weekend_day)
182
+ ] @constant
183
+
184
+ (gantt_title_statement text: (gantt_line_text) @string)
185
+ (gantt_section_statement name: (gantt_line_text) @string)
186
+
187
+ [
188
+ (gantt_task_name)
189
+ (gantt_setting_value)
190
+ (gantt_today_marker_value)
191
+ (gantt_accessibility_block_text)
192
+ (gantt_unclosed_accessibility_block_text)
193
+ ] @string
194
+
195
+ [
196
+ (gantt_date)
197
+ (gantt_duration)
198
+ ] @constant.numeric
199
+
200
+ (gantt_reference) @variable
201
+ (gantt_callback_name) @function
202
+ (gantt_callback_arguments) @string
203
+
204
+ [
205
+ (gantt_url)
206
+ (gantt_unclosed_url)
207
+ ] @string.special
208
+
209
+ (gantt_task_statement delimiter: ":" @punctuation.delimiter)
210
+ (gantt_task_metadata "," @punctuation.delimiter)
211
+ (gantt_call_action ["(" ")"] @punctuation.bracket)
212
+
213
+ ; Ishikawa.
214
+ (ishikawa_label) @string
215
+
216
+ ; Journey.
217
+ (journey_section_name) @namespace
218
+ (journey_task_name) @string
219
+ (journey_score) @constant.numeric
220
+ (journey_actor) @variable
221
+
222
+ [
223
+ (journey_title_text)
224
+ (journey_accessibility_line_text)
225
+ (journey_accessibility_description_block)
226
+ (journey_unclosed_accessibility_description_block)
227
+ ] @string
228
+
229
+ [
230
+ (journey_task_delimiter)
231
+ (journey_actor_delimiter)
232
+ ] @punctuation.delimiter
233
+
234
+ (journey_hash_comment) @comment
235
+
236
+ ; Quadrant Chart.
237
+ [
238
+ (quadrant_chart_axis)
239
+ (quadrant_chart_quadrant)
240
+ ] @keyword
241
+
242
+ (quadrant_chart_axis_delimiter) @operator
243
+
244
+ [
245
+ (quadrant_chart_line_text)
246
+ (quadrant_chart_accessibility_line_text)
247
+ (quadrant_chart_accessibility_description_block)
248
+ (quadrant_chart_unclosed_accessibility_description_block)
249
+ (quadrant_chart_axis_text)
250
+ (quadrant_chart_label)
251
+ (quadrant_chart_point_label)
252
+ (quadrant_chart_style_value)
253
+ ] @string
254
+
255
+ (quadrant_chart_class_name) @type
256
+ (quadrant_chart_style_name) @variable.other.member
257
+
258
+ [
259
+ (quadrant_chart_coordinate)
260
+ (quadrant_chart_invalid_coordinate)
261
+ ] @constant.numeric
262
+
263
+ [
264
+ (quadrant_chart_point_delimiter)
265
+ (quadrant_chart_class_delimiter)
266
+ ] @punctuation.delimiter
267
+
268
+ (quadrant_chart_coordinates
269
+ ["[" "]"] @punctuation.bracket
270
+ "," @punctuation.delimiter)
271
+
272
+ (quadrant_chart_style
273
+ ":" @punctuation.delimiter)
274
+
275
+ (quadrant_chart_style_list
276
+ "," @punctuation.delimiter)
277
+
278
+ ; Requirement.
279
+ (requirement_statement_keyword) @keyword
280
+ (requirement_attribute_keyword) @variable.other.member
281
+ (requirement_kind) @type
282
+ (requirement_relationship_kind) @keyword.operator
283
+
284
+ [
285
+ (requirement_direction)
286
+ (requirement_risk)
287
+ (requirement_verify_method)
288
+ ] @constant
289
+
290
+ [
291
+ (requirement_unquoted_name)
292
+ (requirement_unquoted_reference)
293
+ (requirement_style_identifier)
294
+ ] @variable
295
+
296
+ [
297
+ (requirement_string)
298
+ (requirement_unclosed_string)
299
+ (requirement_attribute_text)
300
+ (requirement_line_text)
301
+ (requirement_accessibility_block_text)
302
+ (requirement_style_value)
303
+ ] @string
304
+
305
+ (requirement_style_property) @variable.other.member
306
+ (requirement_relationship_operator) @operator
307
+ (requirement_hash_comment) @comment
308
+
309
+ (requirement_attribute
310
+ delimiter: ":" @punctuation.delimiter)
311
+
312
+ (requirement_element_attribute
313
+ delimiter: ":" @punctuation.delimiter)
314
+
315
+ (requirement_style_declaration
316
+ delimiter: ":" @punctuation.delimiter)
317
+
318
+ (requirement_class_annotation
319
+ delimiter: [":::" ","] @punctuation.delimiter)
320
+
321
+ (requirement_identifier_list
322
+ delimiter: "," @punctuation.delimiter)
323
+
324
+ (requirement_declaration
325
+ open: "{" @punctuation.bracket
326
+ close: "}" @punctuation.bracket)
327
+
328
+ (requirement_element_declaration
329
+ open: "{" @punctuation.bracket
330
+ close: "}" @punctuation.bracket)
331
+
332
+ ; Timeline.
333
+ (timeline_statement_keyword) @keyword
334
+ (timeline_direction) @constant
335
+
336
+ [
337
+ (timeline_line_text)
338
+ (timeline_section_name)
339
+ (timeline_period)
340
+ (timeline_event_text)
341
+ (timeline_accessibility_block_text)
342
+ ] @string
343
+
344
+ (timeline_event_delimiter) @punctuation.delimiter
345
+ (timeline_hash_comment) @comment
346
+
347
+ ; XY Chart.
348
+ (xy_chart_beta_marker) @attribute
349
+ (xy_chart_orientation) @constant
350
+
351
+ [
352
+ (xy_chart_quoted_text)
353
+ (xy_chart_markdown_text)
354
+ (xy_chart_bare_text)
355
+ (xy_chart_accessibility_text)
356
+ (xy_chart_accessibility_block_text)
357
+ ] @string
358
+
359
+ (xy_chart_axis_range
360
+ (xy_chart_number) @constant.numeric)
361
+
362
+ (xy_chart_incomplete_axis_range
363
+ (xy_chart_number) @constant.numeric)
364
+
365
+ (xy_chart_data_point
366
+ value: (xy_chart_number) @constant.numeric)
367
+
368
+ (xy_chart_range_delimiter) @operator
369
+
370
+ [
371
+ (xy_chart_array_open)
372
+ (xy_chart_array_close)
373
+ ] @punctuation.bracket
374
+
375
+ [
376
+ (xy_chart_array_delimiter)
377
+ (xy_chart_accessibility_delimiter)
378
+ (xy_chart_statement_delimiter)
379
+ ] @punctuation.delimiter
380
+
381
+ ; Block.
382
+ (block_statement_keyword) @keyword
383
+ (block_end) @keyword
384
+
385
+ (block_identifier) @variable
386
+ (block_arrow_direction) @constant
387
+
388
+ [
389
+ (block_quoted_label)
390
+ (block_bare_label)
391
+ (block_line_text)
392
+ (block_accessibility_description_block)
393
+ (block_unclosed_accessibility_description_block)
394
+ (block_style_value)
395
+ ] @string
396
+
397
+ [
398
+ (block_column_count)
399
+ (block_width)
400
+ ] @constant.numeric
401
+
402
+ (block_style_property) @variable.other.member
403
+
404
+ [
405
+ (block_edge_label_start)
406
+ (block_edge_operator)
407
+ ] @operator
408
+
409
+ (block_shape_delimiter) @punctuation.bracket
410
+
411
+ (block_space_statement delimiter: ":" @punctuation.delimiter)
412
+ (block_width_clause delimiter: ":" @punctuation.delimiter)
413
+ (block_identifier_list delimiter: "," @punctuation.delimiter)
414
+ (block_style_list delimiter: "," @punctuation.delimiter)
415
+ (block_style_declaration delimiter: ":" @punctuation.delimiter)
416
+
417
+ ; C4.
418
+ (c4_statement_keyword) @keyword
419
+ (c4_entity_kind) @type
420
+ (c4_boundary_kind) @type
421
+ (c4_relationship_kind) @keyword.operator
422
+ (c4_update_kind) @function.macro
423
+ (c4_direction) @constant
424
+
425
+ (c4_identifier) @variable
426
+ (c4_property_name) @variable.other.member
427
+
428
+ [
429
+ (c4_string)
430
+ (c4_unclosed_string)
431
+ (c4_unquoted_argument)
432
+ (c4_line_text)
433
+ (c4_accessibility_description_block)
434
+ (c4_unclosed_accessibility_description_block)
435
+ ] @string
436
+
437
+ (c4_named_argument sigil: "$" @punctuation.special)
438
+ (c4_named_argument operator: "=" @operator)
439
+
440
+ [
441
+ (c4_entity_declaration open: "(")
442
+ (c4_entity_declaration close: ")")
443
+ (c4_boundary_statement open: "{")
444
+ (c4_boundary_statement close: "}")
445
+ (c4_relationship_statement open: "(")
446
+ (c4_relationship_statement close: ")")
447
+ (c4_style_update_statement open: "(")
448
+ (c4_style_update_statement close: ")")
449
+ ] @punctuation.bracket
450
+
451
+ [
452
+ (c4_entity_declaration delimiter: ",")
453
+ (c4_boundary_statement delimiter: ",")
454
+ (c4_relationship_statement delimiter: ",")
455
+ (c4_style_update_statement delimiter: ",")
456
+ ] @punctuation.delimiter
457
+
458
+ ; Class.
459
+ (class_statement_keyword) @keyword
460
+ (class_callback_keyword) @keyword
461
+
462
+ (class_namespace_name) @namespace
463
+ (class_direction) @constant
464
+
465
+ [
466
+ (class_name)
467
+ (class_reference)
468
+ ] @type
469
+
470
+ [
471
+ (class_style_name)
472
+ (class_annotation_name)
473
+ ] @attribute
474
+
475
+ (class_member) @variable.other.member
476
+ (class_style_item) @variable.other.member
477
+ (class_relationship_operator) @operator
478
+ (class_relationship_label) @string
479
+ (class_note_relation) @keyword.operator
480
+
481
+ [
482
+ (class_string)
483
+ (class_unclosed_string)
484
+ (class_note_text)
485
+ (class_line_text)
486
+ (class_accessibility_description_block)
487
+ (class_unclosed_accessibility_description_block)
488
+ ] @string
489
+
490
+ (class_callback_name) @function
491
+ (class_callback_arguments) @string
492
+ (class_link_target) @constant
493
+
494
+ ; Entity Relationship.
495
+ (er_statement_keyword) @keyword
496
+
497
+ [
498
+ (er_entity_name)
499
+ (er_entity_reference)
500
+ ] @type
501
+
502
+ (er_attribute_type) @type.builtin
503
+ (er_attribute_name) @variable.other.member
504
+ (er_attribute_key) @attribute
505
+ (er_direction) @constant
506
+
507
+ [
508
+ (er_cardinality)
509
+ (er_relationship_operator)
510
+ ] @operator
511
+
512
+ [
513
+ (er_quoted_text)
514
+ (er_unclosed_quoted_text)
515
+ (er_role_text)
516
+ (er_line_text)
517
+ (er_accessibility_description_block)
518
+ (er_unclosed_accessibility_description_block)
519
+ ] @string
520
+
521
+ (er_style_name) @attribute
522
+ (er_style_item) @variable.other.member
523
+
524
+ ; Flowchart.
525
+ (flow_statement_keyword) @keyword
526
+ (flow_subgraph_end) @keyword
527
+
528
+ [
529
+ (flow_node_id)
530
+ (flow_reference)
531
+ ] @variable
532
+
533
+ (flow_edge_name) @variable.other.member
534
+ (flow_class_name) @type
535
+ (flow_callback_name) @function
536
+
537
+ [
538
+ (flow_quoted_label)
539
+ (flow_markdown_label)
540
+ (flow_label_text)
541
+ (flow_square_label_text)
542
+ (flow_round_label_text)
543
+ (flow_curly_label_text)
544
+ (flow_edge_label_text)
545
+ (flow_middle_edge_label_text)
546
+ (flow_shape_data_string)
547
+ (flow_style_value)
548
+ (flow_accessibility_text)
549
+ (flow_accessibility_block_text)
550
+ ] @string
551
+
552
+ [
553
+ (direction)
554
+ (flow_direction)
555
+ (flow_link_target)
556
+ ] @constant
557
+
558
+ (flow_style_property) @variable.other.member
559
+ (flow_edge_index) @constant.numeric
560
+
561
+ [
562
+ (flow_arrow)
563
+ (flow_arrow_start)
564
+ (flow_continued_arrow)
565
+ (flow_continued_arrow_start)
566
+ ] @operator
567
+
568
+ (flow_shape_delimiter) @punctuation.bracket
569
+
570
+ (flow_edge_id delimiter: "@" @punctuation.delimiter)
571
+ (flow_edge_label open: "|" @punctuation.delimiter)
572
+ (flow_edge_label close: "|" @punctuation.delimiter)
573
+ (flow_identifier_list delimiter: "," @punctuation.delimiter)
574
+ (flow_number_list delimiter: "," @punctuation.delimiter)
575
+ (flow_style_list delimiter: "," @punctuation.delimiter)
576
+ (flow_style_declaration delimiter: ":" @punctuation.delimiter)
577
+
578
+ ; State.
579
+ (state_statement_keyword) @keyword
580
+ (state_note_end) @keyword
581
+
582
+ [
583
+ (state_name)
584
+ (state_reference)
585
+ ] @variable
586
+
587
+ (state_class_name) @type
588
+
589
+ [
590
+ (state_quoted_text)
591
+ (state_description_text)
592
+ (state_note_text)
593
+ (state_note_line)
594
+ (state_style_value)
595
+ (state_accessibility_text)
596
+ (state_accessibility_block_text)
597
+ ] @string
598
+
599
+ [
600
+ (state_pseudostate_kind)
601
+ (state_marker)
602
+ (state_direction)
603
+ (state_note_position)
604
+ ] @constant
605
+
606
+ (state_style_property) @variable.other.member
607
+ (state_scale_width) @constant.numeric
608
+
609
+ [
610
+ (state_transition_operator)
611
+ (state_concurrent_divider)
612
+ ] @operator
613
+
614
+ (state_class_annotation operator: ":::" @operator)
615
+
616
+ (state_transition_statement delimiter: ":" @punctuation.delimiter)
617
+ (state_description_statement delimiter: ":" @punctuation.delimiter)
618
+ (state_inline_note delimiter: ":" @punctuation.delimiter)
619
+ (state_alias_declaration delimiter: ":" @punctuation.delimiter)
620
+ (state_identifier_list delimiter: "," @punctuation.delimiter)
621
+ (state_style_list delimiter: "," @punctuation.delimiter)
622
+ (state_style_declaration delimiter: ":" @punctuation.delimiter)
623
+
624
+ ; Swimlane. The shared direction node is captured once in the Flowchart section.
625
+ (swimlane_statement_keyword) @keyword
626
+ (swimlane_subgraph_end) @keyword
627
+
628
+ [
629
+ (swimlane_node_id)
630
+ (swimlane_reference)
631
+ ] @variable
632
+
633
+ (swimlane_edge_name) @variable.other.member
634
+ (swimlane_class_name) @type
635
+ (swimlane_callback_name) @function
636
+
637
+ [
638
+ (swimlane_quoted_label)
639
+ (swimlane_markdown_label)
640
+ (swimlane_label_text)
641
+ (swimlane_square_label_text)
642
+ (swimlane_round_label_text)
643
+ (swimlane_curly_label_text)
644
+ (swimlane_edge_label_text)
645
+ (swimlane_middle_edge_label_text)
646
+ (swimlane_shape_data_string)
647
+ (swimlane_style_value)
648
+ (swimlane_accessibility_text)
649
+ (swimlane_accessibility_block_text)
650
+ ] @string
651
+
652
+ [
653
+ (swimlane_direction)
654
+ (swimlane_link_target)
655
+ ] @constant
656
+
657
+ (swimlane_style_property) @variable.other.member
658
+ (swimlane_edge_index) @constant.numeric
659
+
660
+ [
661
+ (swimlane_arrow)
662
+ (swimlane_arrow_start)
663
+ (swimlane_continued_arrow)
664
+ (swimlane_continued_arrow_start)
665
+ ] @operator
666
+
667
+ (swimlane_shape_delimiter) @punctuation.bracket
668
+
669
+ (swimlane_edge_id delimiter: "@" @punctuation.delimiter)
670
+ (swimlane_edge_label open: "|" @punctuation.delimiter)
671
+ (swimlane_edge_label close: "|" @punctuation.delimiter)
672
+ (swimlane_identifier_list delimiter: "," @punctuation.delimiter)
673
+ (swimlane_number_list delimiter: "," @punctuation.delimiter)
674
+ (swimlane_style_list delimiter: "," @punctuation.delimiter)
675
+ (swimlane_style_declaration delimiter: ":" @punctuation.delimiter)
676
+
677
+ ; Event Modeling.
678
+ (event_statement_keyword) @keyword
679
+
680
+ (event_frame_id) @constant.numeric
681
+ (event_entity_kind) @type.builtin
682
+ (event_name_part) @type
683
+ (event_data_name) @variable
684
+ (event_relation_operator) @operator
685
+ (event_data_type_name) @type.builtin
686
+
687
+ [
688
+ (event_inline_object)
689
+ (event_inline_string)
690
+ (event_line_text)
691
+ ] @string
692
+
693
+ ; Sequence.
694
+ (sequence_statement_keyword) @keyword
695
+ (sequence_block_keyword) @keyword
696
+ (sequence_block_end) @keyword
697
+
698
+ (sequence_participant_name) @type
699
+ (sequence_actor_reference) @variable
700
+ (sequence_participant_config) @attribute
701
+ (sequence_number) @constant.numeric
702
+
703
+ [
704
+ (sequence_message_operator)
705
+ (sequence_central_connection)
706
+ (sequence_inline_activation)
707
+ ] @operator
708
+
709
+ (sequence_note_placement) @keyword.operator
710
+
711
+ [
712
+ (sequence_line_text)
713
+ (sequence_message_text)
714
+ (sequence_note_text)
715
+ (sequence_block_label)
716
+ ] @string
717
+
718
+ ; Kanban.
719
+ (kanban_item
720
+ id: (kanban_item_id) @variable)
721
+
722
+ [
723
+ (kanban_plain_label)
724
+ (kanban_label_text)
725
+ (kanban_quoted_string)
726
+ (kanban_markdown_string)
727
+ (kanban_multiline_label_text)
728
+ ] @string
729
+
730
+ (kanban_metadata_pair
731
+ key: (kanban_metadata_key) @variable.other.member)
732
+
733
+ (kanban_metadata_bare_value) @string
734
+
735
+ (kanban_icon_marker) @function.macro
736
+ (kanban_icon_name) @string.special
737
+ (kanban_class_marker) @punctuation.special
738
+ (kanban_class_list) @type
739
+
740
+ (kanban_shape_delimiter) @punctuation.bracket
741
+ (kanban_metadata_delimiter) @punctuation.bracket
742
+ (kanban_metadata_separator) @punctuation.delimiter
743
+
744
+ ; Mindmap.
745
+ (mindmap_node
746
+ id: (mindmap_node_id) @variable)
747
+
748
+ [
749
+ (mindmap_plain_label)
750
+ (mindmap_label_text)
751
+ (mindmap_quoted_string)
752
+ (mindmap_markdown_string)
753
+ (mindmap_multiline_label_text)
754
+ ] @string
755
+
756
+ (mindmap_icon_marker) @function.macro
757
+ (mindmap_icon_name) @string.special
758
+ (mindmap_class_marker) @punctuation.special
759
+ (mindmap_class_list) @type
760
+ (mindmap_shape_delimiter) @punctuation.bracket
761
+
762
+ ; Sankey.
763
+ (sankey_record source: (sankey_field) @string)
764
+ (sankey_record target: (sankey_field) @string)
765
+ (sankey_record value: (sankey_field) @constant.numeric)
766
+
767
+ (sankey_escaped_quote) @constant.character.escape
768
+ (sankey_quote) @punctuation.bracket
769
+ (sankey_record_delimiter) @punctuation.delimiter
770
+
771
+ ; Venn.
772
+ (venn_set_expression set: (venn_identifier) @variable)
773
+ (venn_intersection_expression set: (venn_identifier) @variable)
774
+ (venn_expression (venn_identifier) @variable)
775
+ (venn_text_value (venn_identifier) @string)
776
+
777
+ (venn_title_text) @string
778
+ (venn_label
779
+ text: [
780
+ (venn_quoted_label)
781
+ (venn_unquoted_label)
782
+ ] @string)
783
+
784
+ (venn_number) @constant.numeric
785
+ (venn_color) @string.special
786
+ (venn_style_property) @variable.other.member
787
+ (venn_style_atom) @constant
788
+
789
+ (venn_quote) @punctuation.bracket
790
+ (venn_label_delimiter) @punctuation.bracket
791
+ (venn_set_delimiter) @punctuation.delimiter
792
+ (venn_value_delimiter) @punctuation.delimiter
793
+ (venn_style_delimiter) @punctuation.delimiter
794
+
795
+ ; Tree View.
796
+ [
797
+ (tree_view_bare_name)
798
+ (tree_view_quoted_name)
799
+ (tree_view_unclosed_name)
800
+ ] @string
801
+
802
+ (tree_view_class_marker) @punctuation.special
803
+ (tree_view_class_name) @type
804
+ (tree_view_icon_open) @function.macro
805
+ (tree_view_icon_name) @string.special
806
+ (tree_view_description_marker) @punctuation.special
807
+ (tree_view_description_text) @comment.block.documentation
808
+
809
+ [
810
+ (tree_view_box_prefix)
811
+ (tree_view_box_decoration)
812
+ ] @punctuation.special
813
+
814
+ ; Treemap.
815
+ [
816
+ (treemap_quoted_name)
817
+ (treemap_unclosed_name)
818
+ ] @string
819
+
820
+ (treemap_value_separator) @punctuation.delimiter
821
+ (treemap_number) @constant.numeric
822
+ (treemap_class_marker) @punctuation.special
823
+ (treemap_class_name) @type
824
+
825
+ ; Railroad shared.
826
+ (railroad_statement_keyword) @keyword
827
+ (railroad_line_text) @string
828
+
829
+ ; Railroad IR.
830
+ (railroad_constructor_keyword) @keyword
831
+
832
+ (railroad_rule
833
+ name: (railroad_identifier) @function)
834
+
835
+ (railroad_assignment_operator) @operator
836
+
837
+ (railroad_terminal
838
+ value: (railroad_string) @string)
839
+
840
+ (railroad_reference
841
+ name: (railroad_string) @variable)
842
+
843
+ (railroad_special
844
+ text: (railroad_string) @string.special)
845
+
846
+ (railroad_block_comment) @comment
847
+
848
+ ; Railroad ABNF.
849
+ (railroad_abnf_rule
850
+ name: (railroad_abnf_rule_name) @function)
851
+
852
+ (railroad_abnf_reference
853
+ name: (railroad_abnf_rule_name) @variable)
854
+
855
+ [
856
+ (railroad_abnf_assignment_operator)
857
+ (railroad_abnf_alternation_operator)
858
+ ] @operator
859
+
860
+ (railroad_abnf_repeat) @constant.numeric
861
+ (railroad_abnf_string) @string
862
+ (railroad_abnf_numeric_value) @constant.numeric
863
+ (railroad_abnf_comment) @comment
864
+
865
+ ; Railroad EBNF.
866
+ (railroad_ebnf_rule
867
+ name: (railroad_ebnf_identifier) @function)
868
+
869
+ (railroad_ebnf_reference
870
+ name: (railroad_ebnf_identifier) @variable)
871
+
872
+ [
873
+ (railroad_ebnf_assignment_operator)
874
+ (railroad_ebnf_choice_operator)
875
+ (railroad_ebnf_quantifier)
876
+ (railroad_ebnf_exception_operator)
877
+ ] @operator
878
+
879
+ (railroad_ebnf_string) @string
880
+ (railroad_ebnf_special_text) @string.special
881
+ (railroad_ebnf_iso_comment) @comment
882
+ (railroad_ebnf_block_comment) @comment
883
+
884
+ ; Railroad PEG.
885
+ (railroad_peg_rule
886
+ name: (railroad_peg_identifier) @function)
887
+
888
+ (railroad_peg_reference
889
+ name: (railroad_peg_identifier) @variable)
890
+
891
+ [
892
+ (railroad_peg_assignment_operator)
893
+ (railroad_peg_choice_operator)
894
+ (railroad_peg_prefix_operator)
895
+ (railroad_peg_suffix_operator)
896
+ ] @operator
897
+
898
+ (railroad_peg_string) @string
899
+ (railroad_peg_any) @constant
900
+ (railroad_peg_comment) @comment
901
+
902
+ ; ZenUML.
903
+ (zenuml_statement_keyword) @keyword
904
+ (zenuml_control_keyword) @keyword
905
+ (zenuml_modifier) @keyword
906
+
907
+ [
908
+ (zenuml_starter_annotation)
909
+ (zenuml_reply_annotation)
910
+ (zenuml_participant_annotation)
911
+ (zenuml_stereotype)
912
+ (zenuml_color)
913
+ ] @attribute
914
+
915
+ (zenuml_participant_declaration
916
+ name: (zenuml_name) @type)
917
+ (zenuml_starter_declaration
918
+ participant: (zenuml_name) @type)
919
+ (zenuml_construct
920
+ name: (zenuml_name) @type)
921
+
922
+ (zenuml_endpoint
923
+ name: (zenuml_name) @variable)
924
+ (zenuml_reference_list
925
+ participant: (zenuml_name) @variable)
926
+ (zenuml_assignee
927
+ item: (_) @variable)
928
+ (zenuml_expression
929
+ (zenuml_identifier) @variable)
930
+
931
+ (zenuml_signature
932
+ name: (zenuml_name) @function)
933
+ (zenuml_named_argument
934
+ name: (zenuml_identifier) @variable.other.member)
935
+
936
+ [
937
+ (zenuml_arrow)
938
+ (zenuml_return_arrow)
939
+ (zenuml_operator)
940
+ (zenuml_assignment_operator)
941
+ ] @operator
942
+
943
+ [
944
+ (zenuml_title_text)
945
+ (zenuml_event_payload)
946
+ (zenuml_divider_text)
947
+ (zenuml_string)
948
+ (zenuml_unclosed_string)
949
+ ] @string
950
+
951
+ [
952
+ (zenuml_number)
953
+ (zenuml_number_unit)
954
+ (zenuml_money)
955
+ ] @constant.numeric
956
+
957
+ (zenuml_boolean) @constant.builtin.boolean
958
+ (zenuml_nil) @constant
959
+ (zenuml_emoji) @string.special
960
+ (zenuml_comment) @comment