Rename constructor_pattern to record_pattern

pull/204/head
Jonathan Arnett 2022-01-06 01:17:38 +07:00
parent 001b2a7a30
commit 01f1c1a361
6 changed files with 306 additions and 277 deletions

@ -535,7 +535,7 @@ fn field_access(x) {
Cases
=====
fn trial(x, y) {
fn trial(x, y, z) {
case x {
1 -> 2
2 -> 3
@ -551,6 +551,11 @@ fn trial(x, y) {
#(1, 2) -> #(3, 4)
_ -> #(5, 6)
}
case z {
Uri(scheme: Some("https"), ..) -> True
_ -> False
}
}
---
@ -559,6 +564,8 @@ fn trial(x, y) {
(function
name: (identifier)
parameters: (function_parameters
(function_parameter
name: (identifier))
(function_parameter
name: (identifier))
(function_parameter
@ -648,7 +655,33 @@ fn trial(x, y) {
(discard)))
value: (tuple
(integer)
(integer))))))))
(integer)))))
(case
subjects: (case_subjects
(identifier))
clauses: (case_clauses
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(record_pattern
name: (type_identifier)
arguments: (record_pattern_arguments
(record_pattern_argument
label: (identifier)
pattern: (record_pattern
name: (type_identifier)
arguments: (record_pattern_arguments
(record_pattern_argument
pattern: (string)))))
(pattern_spread)))))
value: (record
name: (type_identifier)))
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(discard)))
value: (record
name: (type_identifier))))))))
============
Try patterns
@ -687,14 +720,14 @@ fn try_try_again(x, y) -> Int {
pattern: (discard)
value: (todo))
(try
pattern: (constructor_pattern
pattern: (record_pattern
name: (remote_type_identifier
module: (identifier)
name: (type_identifier))
arguments: (pattern_constructor_arguments))
arguments: (record_pattern_arguments))
value: (todo))
(try
pattern: (constructor_pattern
pattern: (record_pattern
name: (type_identifier))
value: (todo))
(try

@ -62,13 +62,13 @@ if javascript {
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(constructor_pattern
(record_pattern
name: (type_identifier))))
value: (identifier))
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(constructor_pattern
(record_pattern
name: (type_identifier))))
value: (function_call
function: (field_access
@ -185,14 +185,14 @@ pub fn negate(bool: Bool) -> Bool {
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(constructor_pattern
(record_pattern
name: (type_identifier))))
value: (record
name: (type_identifier)))
(case_clause
patterns: (case_clause_patterns
(case_clause_pattern
(constructor_pattern
(record_pattern
name: (type_identifier))))
value: (record
name: (type_identifier))))))))
@ -287,10 +287,10 @@ fn foo(a,) {
(argument
(identifier))))
(let
(constructor_pattern
(record_pattern
(type_identifier)
(pattern_constructor_arguments
(pattern_constructor_argument
(record_pattern_arguments
(record_pattern_argument
(identifier)
(identifier))))
(record_update

@ -584,7 +584,7 @@ module.exports = grammar({
choice(
$.identifier,
$.discard,
$.constructor_pattern,
$.record_pattern,
$.string,
$.integer,
$.float,
@ -594,19 +594,19 @@ module.exports = grammar({
),
optional(field("assign", seq("as", $.identifier)))
),
constructor_pattern: ($) =>
record_pattern: ($) =>
seq(
field("name", choice($.type_identifier, $.remote_type_identifier)),
optional(field("arguments", $.pattern_constructor_arguments))
optional(field("arguments", $.record_pattern_arguments))
),
pattern_constructor_arguments: ($) =>
record_pattern_arguments: ($) =>
seq(
"(",
optional(series_of($.pattern_constructor_argument, ",")),
optional(series_of($.record_pattern_argument, ",")),
optional($.pattern_spread),
")"
),
pattern_constructor_argument: ($) =>
record_pattern_argument: ($) =>
seq(
optional(seq(field("label", $.identifier), ":")),
field("pattern", $._pattern)

@ -2308,20 +2308,20 @@
}
},
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "BLANK"
}
]
}
]
},
@ -3844,7 +3844,7 @@
},
{
"type": "SYMBOL",
"name": "constructor_pattern"
"name": "record_pattern"
},
{
"type": "SYMBOL",
@ -3904,11 +3904,7 @@
}
]
},
"var": {
"type": "SYMBOL",
"name": "_name"
},
"constructor_pattern": {
"record_pattern": {
"type": "SEQ",
"members": [
{
@ -3936,7 +3932,7 @@
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "pattern_constructor_arguments"
"name": "record_pattern_arguments"
}
},
{
@ -3946,7 +3942,7 @@
}
]
},
"pattern_constructor_arguments": {
"record_pattern_arguments": {
"type": "SEQ",
"members": [
{
@ -3961,7 +3957,7 @@
"members": [
{
"type": "SYMBOL",
"name": "pattern_constructor_argument"
"name": "record_pattern_argument"
},
{
"type": "REPEAT",
@ -3974,7 +3970,7 @@
},
{
"type": "SYMBOL",
"name": "pattern_constructor_argument"
"name": "record_pattern_argument"
}
]
}
@ -4016,7 +4012,7 @@
}
]
},
"pattern_constructor_argument": {
"record_pattern_argument": {
"type": "SEQ",
"members": [
{
@ -4027,7 +4023,7 @@
"members": [
{
"type": "FIELD",
"name": "name",
"name": "label",
"content": {
"type": "SYMBOL",
"name": "identifier"
@ -5201,20 +5197,20 @@
}
},
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "type_arguments"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "BLANK"
}
]
}
]
},

@ -198,10 +198,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -222,6 +218,10 @@
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
@ -519,10 +519,6 @@
"type": "case",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -567,6 +563,10 @@
"type": "record",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "record_update",
"named": true
@ -982,10 +982,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -1006,6 +1002,10 @@
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
@ -1202,36 +1202,6 @@
}
}
},
{
"type": "constructor_pattern",
"named": true,
"fields": {
"arguments": {
"multiple": false,
"required": false,
"types": [
{
"type": "pattern_constructor_arguments",
"named": true
}
]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
}
}
},
{
"type": "discard",
"named": true,
@ -1902,10 +1872,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -1926,6 +1892,10 @@
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
@ -2243,10 +2213,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -2271,6 +2237,10 @@
"type": "list_pattern_tail",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
@ -2306,101 +2276,6 @@
"named": true,
"fields": {}
},
{
"type": "pattern_constructor_argument",
"named": true,
"fields": {
"assign": {
"multiple": true,
"required": false,
"types": [
{
"type": "as",
"named": false
},
{
"type": "identifier",
"named": true
}
]
},
"name": {
"multiple": false,
"required": false,
"types": [
{
"type": "identifier",
"named": true
}
]
},
"pattern": {
"multiple": true,
"required": true,
"types": [
{
"type": "as",
"named": false
},
{
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
},
{
"type": "float",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "integer",
"named": true
},
{
"type": "list_pattern",
"named": true
},
{
"type": "string",
"named": true
},
{
"type": "tuple_pattern",
"named": true
}
]
}
}
},
{
"type": "pattern_constructor_arguments",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": false,
"types": [
{
"type": "pattern_constructor_argument",
"named": true
},
{
"type": "pattern_spread",
"named": true
}
]
}
},
{
"type": "pattern_spread",
"named": true,
@ -2751,6 +2626,131 @@
}
}
},
{
"type": "record_pattern",
"named": true,
"fields": {
"arguments": {
"multiple": false,
"required": false,
"types": [
{
"type": "record_pattern_arguments",
"named": true
}
]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
}
}
},
{
"type": "record_pattern_argument",
"named": true,
"fields": {
"assign": {
"multiple": true,
"required": false,
"types": [
{
"type": "as",
"named": false
},
{
"type": "identifier",
"named": true
}
]
},
"label": {
"multiple": false,
"required": false,
"types": [
{
"type": "identifier",
"named": true
}
]
},
"pattern": {
"multiple": true,
"required": true,
"types": [
{
"type": "as",
"named": false
},
{
"type": "bit_string_pattern",
"named": true
},
{
"type": "discard",
"named": true
},
{
"type": "float",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "integer",
"named": true
},
{
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
},
{
"type": "tuple_pattern",
"named": true
}
]
}
}
},
{
"type": "record_pattern_arguments",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": false,
"types": [
{
"type": "pattern_spread",
"named": true
},
{
"type": "record_pattern_argument",
"named": true
}
]
}
},
{
"type": "record_update",
"named": true,
@ -3210,10 +3210,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -3234,6 +3230,10 @@
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true
@ -3518,10 +3518,6 @@
"type": "bit_string_pattern",
"named": true
},
{
"type": "constructor_pattern",
"named": true
},
{
"type": "discard",
"named": true
@ -3542,6 +3538,10 @@
"type": "list_pattern",
"named": true
},
{
"type": "record_pattern",
"named": true
},
{
"type": "string",
"named": true

@ -192,9 +192,9 @@ enum {
sym_hole = 173,
sym_function_call = 174,
sym__pattern = 175,
sym_constructor_pattern = 176,
sym_pattern_constructor_arguments = 177,
sym_pattern_constructor_argument = 178,
sym_record_pattern = 176,
sym_record_pattern_arguments = 177,
sym_record_pattern_argument = 178,
sym_pattern_spread = 179,
sym_tuple_pattern = 180,
sym__pattern_bit_string = 181,
@ -259,7 +259,7 @@ enum {
aux_sym_case_clause_pattern_repeat1 = 240,
aux_sym_record_update_arguments_repeat1 = 241,
aux_sym_arguments_repeat1 = 242,
aux_sym_pattern_constructor_arguments_repeat1 = 243,
aux_sym_record_pattern_arguments_repeat1 = 243,
aux_sym__pattern_bit_string_repeat1 = 244,
aux_sym_pattern_bit_string_segment_options_repeat1 = 245,
aux_sym_type_constructors_repeat1 = 246,
@ -448,9 +448,9 @@ static const char * const ts_symbol_names[] = {
[sym_hole] = "hole",
[sym_function_call] = "function_call",
[sym__pattern] = "_pattern",
[sym_constructor_pattern] = "constructor_pattern",
[sym_pattern_constructor_arguments] = "pattern_constructor_arguments",
[sym_pattern_constructor_argument] = "pattern_constructor_argument",
[sym_record_pattern] = "record_pattern",
[sym_record_pattern_arguments] = "record_pattern_arguments",
[sym_record_pattern_argument] = "record_pattern_argument",
[sym_pattern_spread] = "pattern_spread",
[sym_tuple_pattern] = "tuple_pattern",
[sym__pattern_bit_string] = "bit_string_pattern",
@ -515,7 +515,7 @@ static const char * const ts_symbol_names[] = {
[aux_sym_case_clause_pattern_repeat1] = "case_clause_pattern_repeat1",
[aux_sym_record_update_arguments_repeat1] = "record_update_arguments_repeat1",
[aux_sym_arguments_repeat1] = "arguments_repeat1",
[aux_sym_pattern_constructor_arguments_repeat1] = "pattern_constructor_arguments_repeat1",
[aux_sym_record_pattern_arguments_repeat1] = "record_pattern_arguments_repeat1",
[aux_sym__pattern_bit_string_repeat1] = "_pattern_bit_string_repeat1",
[aux_sym_pattern_bit_string_segment_options_repeat1] = "pattern_bit_string_segment_options_repeat1",
[aux_sym_type_constructors_repeat1] = "type_constructors_repeat1",
@ -704,9 +704,9 @@ static const TSSymbol ts_symbol_map[] = {
[sym_hole] = sym_hole,
[sym_function_call] = sym_function_call,
[sym__pattern] = sym__pattern,
[sym_constructor_pattern] = sym_constructor_pattern,
[sym_pattern_constructor_arguments] = sym_pattern_constructor_arguments,
[sym_pattern_constructor_argument] = sym_pattern_constructor_argument,
[sym_record_pattern] = sym_record_pattern,
[sym_record_pattern_arguments] = sym_record_pattern_arguments,
[sym_record_pattern_argument] = sym_record_pattern_argument,
[sym_pattern_spread] = sym_pattern_spread,
[sym_tuple_pattern] = sym_tuple_pattern,
[sym__pattern_bit_string] = sym__pattern_bit_string,
@ -771,7 +771,7 @@ static const TSSymbol ts_symbol_map[] = {
[aux_sym_case_clause_pattern_repeat1] = aux_sym_case_clause_pattern_repeat1,
[aux_sym_record_update_arguments_repeat1] = aux_sym_record_update_arguments_repeat1,
[aux_sym_arguments_repeat1] = aux_sym_arguments_repeat1,
[aux_sym_pattern_constructor_arguments_repeat1] = aux_sym_pattern_constructor_arguments_repeat1,
[aux_sym_record_pattern_arguments_repeat1] = aux_sym_record_pattern_arguments_repeat1,
[aux_sym__pattern_bit_string_repeat1] = aux_sym__pattern_bit_string_repeat1,
[aux_sym_pattern_bit_string_segment_options_repeat1] = aux_sym_pattern_bit_string_segment_options_repeat1,
[aux_sym_type_constructors_repeat1] = aux_sym_type_constructors_repeat1,
@ -1488,15 +1488,15 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
.visible = false,
.named = true,
},
[sym_constructor_pattern] = {
[sym_record_pattern] = {
.visible = true,
.named = true,
},
[sym_pattern_constructor_arguments] = {
[sym_record_pattern_arguments] = {
.visible = true,
.named = true,
},
[sym_pattern_constructor_argument] = {
[sym_record_pattern_argument] = {
.visible = true,
.named = true,
},
@ -1756,7 +1756,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
.visible = false,
.named = false,
},
[aux_sym_pattern_constructor_arguments_repeat1] = {
[aux_sym_record_pattern_arguments_repeat1] = {
.visible = false,
.named = false,
},
@ -2105,7 +2105,7 @@ static const TSFieldMapEntry ts_field_map_entries[] = {
{field_assign, 3, .inherited = true},
[121] =
{field_assign, 2, .inherited = true},
{field_name, 0},
{field_label, 0},
{field_pattern, 2},
[124] =
{field_index, 0, .inherited = true},
@ -22491,7 +22491,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -22543,7 +22543,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -22641,7 +22641,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -22785,7 +22785,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -22837,7 +22837,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -22869,7 +22869,7 @@ static const uint16_t ts_small_parse_table[] = {
STATE(681), 1,
sym_identifier,
STATE(748), 1,
sym_pattern_constructor_argument,
sym_record_pattern_argument,
STATE(807), 1,
sym__pattern,
STATE(1057), 1,
@ -22888,7 +22888,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23001,7 +23001,7 @@ static const uint16_t ts_small_parse_table[] = {
STATE(681), 1,
sym_identifier,
STATE(748), 1,
sym_pattern_constructor_argument,
sym_record_pattern_argument,
STATE(807), 1,
sym__pattern,
STATE(1041), 1,
@ -23020,7 +23020,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23052,7 +23052,7 @@ static const uint16_t ts_small_parse_table[] = {
STATE(681), 1,
sym_identifier,
STATE(695), 1,
sym_pattern_constructor_argument,
sym_record_pattern_argument,
STATE(807), 1,
sym__pattern,
STATE(1049), 1,
@ -23071,7 +23071,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23157,7 +23157,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23297,7 +23297,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23346,7 +23346,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23487,7 +23487,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23812,7 +23812,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -23861,7 +23861,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -24048,7 +24048,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -24403,7 +24403,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -24450,7 +24450,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -24849,7 +24849,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -24971,7 +24971,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25016,7 +25016,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25061,7 +25061,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25188,7 +25188,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25233,7 +25233,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25319,7 +25319,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25364,7 +25364,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25409,7 +25409,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25437,7 +25437,7 @@ static const uint16_t ts_small_parse_table[] = {
STATE(681), 1,
sym_identifier,
STATE(748), 1,
sym_pattern_constructor_argument,
sym_record_pattern_argument,
STATE(807), 1,
sym__pattern,
ACTIONS(5), 2,
@ -25454,7 +25454,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25499,7 +25499,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25544,7 +25544,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25589,7 +25589,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25634,7 +25634,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25679,7 +25679,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -25762,7 +25762,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -26254,7 +26254,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -26426,7 +26426,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(701), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -26678,7 +26678,7 @@ static const uint16_t ts_small_parse_table[] = {
sym__octal,
sym__binary,
STATE(642), 6,
sym_constructor_pattern,
sym_record_pattern,
sym_tuple_pattern,
sym__pattern_bit_string,
sym_list_pattern,
@ -29343,7 +29343,7 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(1156), 1,
anon_sym_LPAREN,
STATE(508), 1,
sym_pattern_constructor_arguments,
sym_record_pattern_arguments,
ACTIONS(5), 2,
sym_statement_comment,
sym_comment,
@ -32998,7 +32998,7 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(1439), 1,
anon_sym_RPAREN,
STATE(703), 1,
aux_sym_pattern_constructor_arguments_repeat1,
aux_sym_record_pattern_arguments_repeat1,
STATE(983), 1,
sym_pattern_spread,
ACTIONS(5), 2,
@ -33113,7 +33113,7 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(1462), 1,
anon_sym_COMMA,
STATE(732), 1,
aux_sym_pattern_constructor_arguments_repeat1,
aux_sym_record_pattern_arguments_repeat1,
STATE(1057), 1,
sym_pattern_spread,
ACTIONS(5), 2,
@ -33500,7 +33500,7 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(1546), 1,
anon_sym_COMMA,
STATE(732), 1,
aux_sym_pattern_constructor_arguments_repeat1,
aux_sym_record_pattern_arguments_repeat1,
ACTIONS(5), 2,
sym_statement_comment,
sym_comment,
@ -38432,7 +38432,7 @@ static const TSParseActionEntry ts_parse_actions[] = {
[1148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328),
[1150] = {.entry = {.count = 1, .reusable = false}}, SHIFT(324),
[1152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324),
[1154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constructor_pattern, 1, .production_id = 6),
[1154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern, 1, .production_id = 6),
[1156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313),
[1158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(808),
[1160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_var, 1),
@ -38457,11 +38457,11 @@ static const TSParseActionEntry ts_parse_actions[] = {
[1199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__pattern_bit_string, 3),
[1201] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_pattern, 4, .production_id = 47),
[1203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 4, .production_id = 37),
[1205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_arguments, 5),
[1205] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_arguments, 5),
[1207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 4, .production_id = 48),
[1209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_name, 1, .production_id = 6),
[1211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(821),
[1213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constructor_pattern, 2, .production_id = 17),
[1213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern, 2, .production_id = 17),
[1215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 3, .production_id = 37),
[1217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 3),
[1219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 5, .production_id = 48),
@ -38470,18 +38470,18 @@ static const TSParseActionEntry ts_parse_actions[] = {
[1225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_discard, 1),
[1227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_type, 4, .production_id = 31),
[1229] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__pattern_bit_string, 2),
[1231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_arguments, 3),
[1231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_arguments, 3),
[1233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 2),
[1235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_type, 4),
[1237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_type, 3),
[1239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_pattern, 5, .production_id = 37),
[1241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_arguments, 4),
[1241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_arguments, 4),
[1243] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(1052),
[1246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_arguments, 2),
[1246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_arguments, 2),
[1248] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__pattern_bit_string, 5),
[1250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_type, 3, .production_id = 24),
[1252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_pattern, 5, .production_id = 57),
[1254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_arguments, 6),
[1254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_arguments, 6),
[1256] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 2, .production_id = 17),
[1258] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_pattern, 5, .production_id = 47),
[1260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_arguments, 5),
@ -38622,8 +38622,8 @@ static const TSParseActionEntry ts_parse_actions[] = {
[1539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241),
[1541] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_bit_string_segment_options_repeat1, 2),
[1543] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_bit_string_segment_options_repeat1, 2), SHIFT_REPEAT(271),
[1546] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_pattern_constructor_arguments_repeat1, 2), SHIFT_REPEAT(370),
[1549] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_pattern_constructor_arguments_repeat1, 2),
[1546] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_pattern_arguments_repeat1, 2), SHIFT_REPEAT(370),
[1549] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_pattern_arguments_repeat1, 2),
[1551] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_bit_string_segment_options, 1),
[1553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240),
[1555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319),
@ -38726,11 +38726,11 @@ static const TSParseActionEntry ts_parse_actions[] = {
[1758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(941),
[1760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(559),
[1762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(678),
[1764] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_argument, 1, .production_id = 40),
[1764] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_argument, 1, .production_id = 40),
[1766] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant_type_arguments, 2),
[1768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91),
[1770] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__discard_param, 1, .production_id = 6),
[1772] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pattern_constructor_argument, 3, .production_id = 58),
[1772] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_pattern_argument, 3, .production_id = 58),
[1774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(680),
[1776] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_constructor_arguments_repeat1, 2), SHIFT_REPEAT(443),
[1779] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_constructor_arguments_repeat1, 2),