Preserve the dot token in case patterns

This commit is contained in:
Asger F
2026-06-18 14:55:54 +02:00
parent 142ac47166
commit 0b666d47db
2 changed files with 2 additions and 1 deletions

View File

@@ -1930,7 +1930,7 @@ module.exports = grammar({
seq(
optional("case"),
optional(field("type", $.user_type)), // XXX this should just be _type but that creates ambiguity
$._dot,
field("dot", $._dot),
field("name", $.simple_identifier),
optional(field("arguments", $.tuple_pattern))
),

View File

@@ -173,6 +173,7 @@ named:
value?: expression
case_pattern:
arguments?: tuple_pattern
dot: "."
name: simple_identifier
type?: user_type
catch_block: