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