diff --git a/grammar.js b/grammar.js index bbcc51e..7395f02 100644 --- a/grammar.js +++ b/grammar.js @@ -86,11 +86,9 @@ module.exports = grammar({ seq( $._connection_path, repeat1(seq($.arrow, $._connection_path)), - optional( - seq( - optional(seq($._colon, optional($.label))), - optional(seq(alias($._connection_block, $.block))) - ) + seq( + optional(seq($._colon, optional($.label))), + optional(seq(alias($._connection_block, $.block))) ) ), diff --git a/src/grammar.json b/src/grammar.json index 1d2930d..3766456 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -89,66 +89,58 @@ } }, { - "type": "CHOICE", + "type": "SEQ", "members": [ { - "type": "SEQ", + "type": "CHOICE", "members": [ { - "type": "CHOICE", + "type": "SEQ", "members": [ { - "type": "SEQ", + "type": "SYMBOL", + "name": "_colon" + }, + { + "type": "CHOICE", "members": [ { "type": "SYMBOL", - "name": "_colon" + "name": "label" }, { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "label" - }, - { - "type": "BLANK" - } - ] + "type": "BLANK" } ] - }, - { - "type": "BLANK" } ] }, { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_connection_block" - }, - "named": true, - "value": "block" - } - ] - }, - { - "type": "BLANK" - } - ] + "type": "BLANK" } ] }, { - "type": "BLANK" + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_connection_block" + }, + "named": true, + "value": "block" + } + ] + }, + { + "type": "BLANK" + } + ] } ] } diff --git a/tree-sitter-d2.wasm b/tree-sitter-d2.wasm index 1bff848..06e0feb 100755 Binary files a/tree-sitter-d2.wasm and b/tree-sitter-d2.wasm differ