Add 'default' alias

This makes it appear in the tree as a named node.
This commit is contained in:
Bruno BELANYI 2024-04-09 13:08:02 +01:00
parent d297f38e6a
commit 8db7b053f5
6 changed files with 16 additions and 7 deletions

View file

@ -166,7 +166,7 @@ module.exports = grammar({
),
default_case: ($) => seq(
field("pattern", "default"),
field("pattern", alias("default", $.default)),
":",
field("value", $._case_value),
),