@mermanjs/tree-sitter-mermaid 0.1.0 → 0.2.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.
- package/CMakeLists.txt +1 -1
- package/Makefile +1 -1
- package/README.md +32 -10
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/grammar/families/agentflow.js +121 -0
- package/grammar/families/usecase.js +263 -0
- package/grammar.js +8 -0
- package/metadata/derivations.json +57 -0
- package/metadata/provenance.json +14 -3
- package/package.json +7 -3
- package/prebuilds/darwin-arm64/@mermanjs+tree-sitter-mermaid.node +0 -0
- package/prebuilds/darwin-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
- package/prebuilds/linux-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
- package/prebuilds/win32-x64/@mermanjs+tree-sitter-mermaid.node +0 -0
- package/queries/portable/highlights.scm +71 -0
- package/queries/portable/tags.scm +21 -0
- package/queries/zed/highlights.scm +71 -0
- package/src/grammar.json +6750 -12
- package/src/node-types.json +6927 -3358
- package/src/parser.c +204468 -183432
- package/tree-sitter-mermaid.wasm +0 -0
- package/tree-sitter.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mermanjs/tree-sitter-mermaid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Tolerant Tree-sitter grammar and editor queries for Mermaid",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -80,11 +80,15 @@
|
|
|
80
80
|
"node-gyp-build": "4.8.4"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"node-gyp": "
|
|
83
|
+
"node-gyp": "13.0.1",
|
|
84
84
|
"prebuildify": "6.0.1",
|
|
85
85
|
"tree-sitter": "0.25.1",
|
|
86
86
|
"tree-sitter-cli": "0.26.12",
|
|
87
|
-
"web-tree-sitter": "0.
|
|
87
|
+
"web-tree-sitter": "0.27.0"
|
|
88
|
+
},
|
|
89
|
+
"allowScripts": {
|
|
90
|
+
"tree-sitter@0.25.1": true,
|
|
91
|
+
"tree-sitter-cli@0.26.12": true
|
|
88
92
|
},
|
|
89
93
|
"peerDependencies": {
|
|
90
94
|
"tree-sitter": "^0.25.0"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -959,3 +959,74 @@
|
|
|
959
959
|
(zenuml_nil) @constant
|
|
960
960
|
(zenuml_emoji) @string.special
|
|
961
961
|
(zenuml_comment) @comment
|
|
962
|
+
|
|
963
|
+
; Agentflow. The shared direction node is captured once in the Flowchart section.
|
|
964
|
+
(agentflow_statement_keyword) @keyword
|
|
965
|
+
|
|
966
|
+
[
|
|
967
|
+
(agentflow_node_id)
|
|
968
|
+
(agentflow_reference)
|
|
969
|
+
] @variable
|
|
970
|
+
|
|
971
|
+
(agentflow_edge_name) @variable.member
|
|
972
|
+
(agentflow_class_name) @type
|
|
973
|
+
(agentflow_callback_name) @function
|
|
974
|
+
|
|
975
|
+
[
|
|
976
|
+
(agentflow_quoted_label)
|
|
977
|
+
(agentflow_markdown_label)
|
|
978
|
+
(agentflow_label_text)
|
|
979
|
+
(agentflow_square_label_text)
|
|
980
|
+
(agentflow_round_label_text)
|
|
981
|
+
(agentflow_curly_label_text)
|
|
982
|
+
(agentflow_edge_label_text)
|
|
983
|
+
(agentflow_middle_edge_label_text)
|
|
984
|
+
(agentflow_style_value)
|
|
985
|
+
(agentflow_accessibility_text)
|
|
986
|
+
(agentflow_accessibility_block_text)
|
|
987
|
+
] @string
|
|
988
|
+
|
|
989
|
+
[
|
|
990
|
+
(agentflow_direction)
|
|
991
|
+
(agentflow_link_target)
|
|
992
|
+
] @constant
|
|
993
|
+
|
|
994
|
+
(agentflow_style_property) @property
|
|
995
|
+
(agentflow_edge_index) @number
|
|
996
|
+
|
|
997
|
+
[
|
|
998
|
+
(agentflow_arrow)
|
|
999
|
+
(agentflow_arrow_start)
|
|
1000
|
+
(agentflow_continued_arrow)
|
|
1001
|
+
(agentflow_continued_arrow_start)
|
|
1002
|
+
] @operator
|
|
1003
|
+
|
|
1004
|
+
(agentflow_shape_delimiter) @punctuation.bracket
|
|
1005
|
+
|
|
1006
|
+
(agentflow_edge_id delimiter: "@" @punctuation.delimiter)
|
|
1007
|
+
(agentflow_edge_label open: "|" @punctuation.delimiter)
|
|
1008
|
+
(agentflow_edge_label close: "|" @punctuation.delimiter)
|
|
1009
|
+
(agentflow_identifier_list delimiter: "," @punctuation.delimiter)
|
|
1010
|
+
(agentflow_number_list delimiter: "," @punctuation.delimiter)
|
|
1011
|
+
(agentflow_style_list delimiter: "," @punctuation.delimiter)
|
|
1012
|
+
(agentflow_style_declaration delimiter: ":" @punctuation.delimiter)
|
|
1013
|
+
|
|
1014
|
+
(agentflow_metadata_string) @string
|
|
1015
|
+
(agentflow_container_title) @string
|
|
1016
|
+
|
|
1017
|
+
; Usecase.
|
|
1018
|
+
(usecase_statement_keyword) @keyword
|
|
1019
|
+
(usecase_identifier) @variable
|
|
1020
|
+
(usecase_operator) @operator
|
|
1021
|
+
(usecase_relation_kind) @keyword
|
|
1022
|
+
(usecase_label_text) @string
|
|
1023
|
+
(usecase_string) @string
|
|
1024
|
+
(usecase_stereotype) @type
|
|
1025
|
+
(usecase_metadata_property key: (_) @property)
|
|
1026
|
+
(usecase_style_name) @property
|
|
1027
|
+
(usecase_style_value) @string
|
|
1028
|
+
(usecase_accessibility_text) @string
|
|
1029
|
+
(usecase_json_property key: (usecase_json_string) @property)
|
|
1030
|
+
(usecase_json_string) @string
|
|
1031
|
+
(usecase_json_number) @number
|
|
1032
|
+
(usecase_json_literal) @constant
|
|
@@ -180,3 +180,24 @@
|
|
|
180
180
|
(zenuml_assignment
|
|
181
181
|
assignee: (zenuml_assignee
|
|
182
182
|
item: (zenuml_identifier) @name)) @definition.var
|
|
183
|
+
|
|
184
|
+
; Agentflow.
|
|
185
|
+
(agentflow_flow_statement
|
|
186
|
+
id: (agentflow_node_id) @name) @definition.module
|
|
187
|
+
|
|
188
|
+
(agentflow_connector_statement
|
|
189
|
+
id: (agentflow_node_id) @name) @definition.var
|
|
190
|
+
|
|
191
|
+
(agentflow_vertex
|
|
192
|
+
id: (agentflow_node_id) @name
|
|
193
|
+
shape: (_)) @definition.var
|
|
194
|
+
|
|
195
|
+
; Usecase.
|
|
196
|
+
(usecase_boundary_statement
|
|
197
|
+
id: (usecase_identifier) @name) @definition.module
|
|
198
|
+
|
|
199
|
+
[
|
|
200
|
+
(usecase_actor id: (usecase_identifier) @name)
|
|
201
|
+
(usecase_node id: (usecase_identifier) @name label: (_))
|
|
202
|
+
(usecase_json_statement id: (usecase_identifier) @name)
|
|
203
|
+
] @definition.var
|
|
@@ -959,3 +959,74 @@
|
|
|
959
959
|
(zenuml_nil) @constant
|
|
960
960
|
(zenuml_emoji) @string.special
|
|
961
961
|
(zenuml_comment) @comment
|
|
962
|
+
|
|
963
|
+
; Agentflow. The shared direction node is captured once in the Flowchart section.
|
|
964
|
+
(agentflow_statement_keyword) @keyword
|
|
965
|
+
|
|
966
|
+
[
|
|
967
|
+
(agentflow_node_id)
|
|
968
|
+
(agentflow_reference)
|
|
969
|
+
] @variable
|
|
970
|
+
|
|
971
|
+
(agentflow_edge_name) @property
|
|
972
|
+
(agentflow_class_name) @type
|
|
973
|
+
(agentflow_callback_name) @function
|
|
974
|
+
|
|
975
|
+
[
|
|
976
|
+
(agentflow_quoted_label)
|
|
977
|
+
(agentflow_markdown_label)
|
|
978
|
+
(agentflow_label_text)
|
|
979
|
+
(agentflow_square_label_text)
|
|
980
|
+
(agentflow_round_label_text)
|
|
981
|
+
(agentflow_curly_label_text)
|
|
982
|
+
(agentflow_edge_label_text)
|
|
983
|
+
(agentflow_middle_edge_label_text)
|
|
984
|
+
(agentflow_style_value)
|
|
985
|
+
(agentflow_accessibility_text)
|
|
986
|
+
(agentflow_accessibility_block_text)
|
|
987
|
+
] @string
|
|
988
|
+
|
|
989
|
+
[
|
|
990
|
+
(agentflow_direction)
|
|
991
|
+
(agentflow_link_target)
|
|
992
|
+
] @constant
|
|
993
|
+
|
|
994
|
+
(agentflow_style_property) @property
|
|
995
|
+
(agentflow_edge_index) @number
|
|
996
|
+
|
|
997
|
+
[
|
|
998
|
+
(agentflow_arrow)
|
|
999
|
+
(agentflow_arrow_start)
|
|
1000
|
+
(agentflow_continued_arrow)
|
|
1001
|
+
(agentflow_continued_arrow_start)
|
|
1002
|
+
] @operator
|
|
1003
|
+
|
|
1004
|
+
(agentflow_shape_delimiter) @punctuation.bracket
|
|
1005
|
+
|
|
1006
|
+
(agentflow_edge_id delimiter: "@" @punctuation.delimiter)
|
|
1007
|
+
(agentflow_edge_label open: "|" @punctuation.delimiter)
|
|
1008
|
+
(agentflow_edge_label close: "|" @punctuation.delimiter)
|
|
1009
|
+
(agentflow_identifier_list delimiter: "," @punctuation.delimiter)
|
|
1010
|
+
(agentflow_number_list delimiter: "," @punctuation.delimiter)
|
|
1011
|
+
(agentflow_style_list delimiter: "," @punctuation.delimiter)
|
|
1012
|
+
(agentflow_style_declaration delimiter: ":" @punctuation.delimiter)
|
|
1013
|
+
|
|
1014
|
+
(agentflow_metadata_string) @string
|
|
1015
|
+
(agentflow_container_title) @string
|
|
1016
|
+
|
|
1017
|
+
; Usecase.
|
|
1018
|
+
(usecase_statement_keyword) @keyword
|
|
1019
|
+
(usecase_identifier) @variable
|
|
1020
|
+
(usecase_operator) @operator
|
|
1021
|
+
(usecase_relation_kind) @keyword
|
|
1022
|
+
(usecase_label_text) @string
|
|
1023
|
+
(usecase_string) @string
|
|
1024
|
+
(usecase_stereotype) @type
|
|
1025
|
+
(usecase_metadata_property key: (_) @property)
|
|
1026
|
+
(usecase_style_name) @property
|
|
1027
|
+
(usecase_style_value) @string
|
|
1028
|
+
(usecase_accessibility_text) @string
|
|
1029
|
+
(usecase_json_property key: (usecase_json_string) @property)
|
|
1030
|
+
(usecase_json_string) @string
|
|
1031
|
+
(usecase_json_number) @number
|
|
1032
|
+
(usecase_json_literal) @constant
|