A great big update

Highlights:
- Give "_upname" the visible name "type_identifier". Name stolen
shamelessly from tree-sitter-rust.
- Remove "record_name" in favor of "type_identifier".
- Remote "function_name" in favor of "identifier".
- Surface names for several nodes, mostly using "type_identifier".
- Remove "remote_" variants of several nodes. Essentially we needed to
give these nodes "names" anyhow, and having the name encapsulate the
local vs remote information proved wildly efficient.
pull/204/head
Jonathan Arnett 2022-01-02 03:27:22 +07:00
parent e5b283e41a
commit 35cd8b2dfd
11 changed files with 16438 additions and 16460 deletions

@ -29,17 +29,21 @@ const a: option.Option(String) = option.Some("Hello, World!")
value: (string)) value: (string))
(constant (constant
name: (identifier) name: (identifier)
type: (type) type: (type
name: (type_identifier))
value: (integer)) value: (integer))
(constant (constant
name: (identifier) name: (identifier)
type: (type) type: (type
name: (type_identifier))
value: (float)) value: (float))
(constant (constant
name: (identifier) name: (identifier)
type: (tuple_type type: (tuple_type
(type) (type
(type)) name: (type_identifier))
(type
name: (type_identifier)))
value: (tuple value: (tuple
(integer) (integer)
(string))) (string)))
@ -50,16 +54,19 @@ const a: option.Option(String) = option.Some("Hello, World!")
(constant (constant
name: (identifier) name: (identifier)
type: (type type: (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
value: (list value: (list
(integer) (integer)
(integer))) (integer)))
(constant (constant
name: (identifier) name: (identifier)
type: (type type: (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(type_hole)))) (type_hole))))
value: (list)) value: (list))
@ -108,17 +115,17 @@ const a: option.Option(String) = option.Some("Hello, World!")
(constant (constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name))) name: (type_identifier)))
(constant (constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments))) arguments: (arguments)))
(constant (constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments arguments: (arguments
(argument (argument
value: (string)) value: (string))
(argument (argument
@ -126,8 +133,8 @@ const a: option.Option(String) = option.Some("Hello, World!")
(constant (constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string)) value: (string))
@ -136,25 +143,29 @@ const a: option.Option(String) = option.Some("Hello, World!")
value: (integer))))) value: (integer)))))
(constant (constant
name: (identifier) name: (identifier)
value: (remote_record value: (record
module: (identifier) name: (remote_type_identifier
(record_name) module: (identifier)
(arguments name: (type_identifier))
arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string))))) value: (string)))))
(constant (constant
name: (identifier) name: (identifier)
type: (remote_type type: (type
module: (identifier) name: (remote_type_identifier
(type module: (identifier)
(type_arguments name: (type_identifier))
(type_argument arguments: (type_arguments
(type))))) (type_argument
value: (remote_record (type
module: (identifier) name: (type_identifier)))))
(record_name) value: (record
(arguments name: (remote_type_identifier
module: (identifier)
name: (type_identifier))
arguments: (arguments
(argument (argument
value: (string)))))) value: (string))))))
@ -188,17 +199,21 @@ pub const a = uri.Uri(host: "github.com")
value: (string)) value: (string))
(public_constant (public_constant
name: (identifier) name: (identifier)
type: (type) type: (type
name: (type_identifier))
value: (integer)) value: (integer))
(public_constant (public_constant
name: (identifier) name: (identifier)
type: (type) type: (type
name: (type_identifier))
value: (float)) value: (float))
(public_constant (public_constant
name: (identifier) name: (identifier)
type: (tuple_type type: (tuple_type
(type) (type
(type)) name: (type_identifier))
(type
name: (type_identifier)))
value: (tuple value: (tuple
(integer) (integer)
(string))) (string)))
@ -209,16 +224,19 @@ pub const a = uri.Uri(host: "github.com")
(public_constant (public_constant
name: (identifier) name: (identifier)
type: (type type: (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
value: (list value: (list
(integer) (integer)
(integer))) (integer)))
(public_constant (public_constant
name: (identifier) name: (identifier)
type: (type type: (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(type_hole)))) (type_hole))))
value: (list)) value: (list))
@ -267,17 +285,17 @@ pub const a = uri.Uri(host: "github.com")
(public_constant (public_constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name))) name: (type_identifier)))
(public_constant (public_constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments))) arguments: (arguments)))
(public_constant (public_constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments arguments: (arguments
(argument (argument
value: (string)) value: (string))
(argument (argument
@ -285,8 +303,8 @@ pub const a = uri.Uri(host: "github.com")
(public_constant (public_constant
name: (identifier) name: (identifier)
value: (record value: (record
(record_name) name: (type_identifier)
(arguments arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string)) value: (string))
@ -295,10 +313,11 @@ pub const a = uri.Uri(host: "github.com")
value: (integer))))) value: (integer)))))
(public_constant (public_constant
name: (identifier) name: (identifier)
value: (remote_record value: (record
module: (identifier) name: (remote_type_identifier
(record_name) module: (identifier)
(arguments name: (type_identifier))
arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string)))))) value: (string))))))

@ -11,35 +11,45 @@ type NamedBox(inner_type) { Box(String, inner: inner_type) }
(source_file (source_file
(type_definition (type_definition
(type_name) (type_name
name: (type_identifier))
(type_constructors (type_constructors
(type_constructor))) (type_constructor
name: (type_identifier))))
(type_definition (type_definition
(type_name) (type_name
name: (type_identifier))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
value: (type)))))) value: (type
name: (type_identifier)))))))
(type_definition (type_definition
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type_var)))))) value: (type_var))))))
(type_definition (type_definition
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type_var))))))) value: (type_var)))))))
@ -71,48 +81,65 @@ type Boring {
(source_file (source_file
(type_definition (type_definition
(type_name) (type_name
name: (type_identifier))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)))))) value: (type
name: (type_identifier)))))))
(type_definition (type_definition
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter) (type_parameter)
(type_parameter))) (type_parameter)))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)))) value: (type
name: (type_identifier)))))
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)))))) value: (type
name: (type_identifier)))))))
(type_definition (type_definition
(type_name) (type_name
name: (type_identifier))
(type_constructors (type_constructors
(type_constructor) (type_constructor
(type_constructor) name: (type_identifier))
(type_constructor))) (type_constructor
name: (type_identifier))
(type_constructor
name: (type_identifier))))
(type_definition (type_definition
(type_name) (type_name
name: (type_identifier))
(type_constructors (type_constructors
(type_constructor)))) (type_constructor
name: (type_identifier)))))
============================== ==============================
Public custom type definitions Public custom type definitions
@ -128,26 +155,33 @@ pub type Animal(name, cuteness) {
(source_file (source_file
(public_type_definition (public_type_definition
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter) (type_parameter)
(type_parameter))) (type_parameter)))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)))) value: (type
name: (type_identifier)))))
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type))))))) value: (type
name: (type_identifier))))))))
===================================== =====================================
Public opaque custom type definitions Public opaque custom type definitions
@ -163,23 +197,30 @@ pub opaque type Animal(name, cuteness) {
(source_file (source_file
(public_opaque_type_definition (public_opaque_type_definition
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter) (type_parameter)
(type_parameter))) (type_parameter)))
(type_constructors (type_constructors
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)))) value: (type
name: (type_identifier)))))
(type_constructor (type_constructor
(type_constructor_arguments name: (type_identifier)
arguments: (type_constructor_arguments
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type)) value: (type
name: (type_identifier)))
(type_constructor_argument (type_constructor_argument
label: (identifier) label: (identifier)
value: (type))))))) value: (type
name: (type_identifier))))))))

@ -11,40 +11,50 @@ external fn a() -> #(List(Int), fn(Int) -> String) = "x" "y"
(source_file (source_file
(external_function (external_function
name: (function_name) name: (identifier)
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
type: (type))) type: (type
name: (type_identifier))))
return_type: (type return_type: (type
name: (type_identifier)
arguments: (type_arguments arguments: (type_arguments
(type_argument (type_argument
(type)) (type
name: (type_identifier)))
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
body: (external_function_body body: (external_function_body
(string) (string)
(string))) (string)))
(external_function (external_function
name: (function_name) name: (identifier)
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type))) type: (type
return_type: (type) name: (type_identifier))))
return_type: (type
name: (type_identifier))
body: (external_function_body body: (external_function_body
(string) (string)
(string))) (string)))
(external_function (external_function
name: (function_name) name: (identifier)
return_type: (tuple_type return_type: (tuple_type
(type (type
name: (type_identifier)
arguments: (type_arguments arguments: (type_arguments
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
(function_type (function_type
parameter_types: (function_parameter_types parameter_types: (function_parameter_types
(type)) (type
return_type: (type))) name: (type_identifier)))
return_type: (type
name: (type_identifier))))
body: (external_function_body body: (external_function_body
(string) (string)
(string)))) (string))))
@ -62,40 +72,50 @@ pub external fn a() -> #(List(Int), fn(Int) -> String) = "x" "y"
(source_file (source_file
(public_external_function (public_external_function
name: (function_name) name: (identifier)
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
type: (type))) type: (type
name: (type_identifier))))
return_type: (type return_type: (type
name: (type_identifier)
arguments: (type_arguments arguments: (type_arguments
(type_argument (type_argument
(type)) (type
name: (type_identifier)))
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
body: (external_function_body body: (external_function_body
(string) (string)
(string))) (string)))
(public_external_function (public_external_function
name: (function_name) name: (identifier)
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type))) type: (type
return_type: (type) name: (type_identifier))))
return_type: (type
name: (type_identifier))
body: (external_function_body body: (external_function_body
(string) (string)
(string))) (string)))
(public_external_function (public_external_function
name: (function_name) name: (identifier)
return_type: (tuple_type return_type: (tuple_type
(type (type
name: (type_identifier)
arguments: (type_arguments arguments: (type_arguments
(type_argument (type_argument
(type)))) (type
name: (type_identifier)))))
(function_type (function_type
parameter_types: (function_parameter_types parameter_types: (function_parameter_types
(type)) (type
return_type: (type))) name: (type_identifier)))
return_type: (type
name: (type_identifier))))
body: (external_function_body body: (external_function_body
(string) (string)
(string)))) (string))))

@ -10,13 +10,16 @@ external type Map(key, value)
(source_file (source_file
(external_type (external_type
(type_name)) (type_name
name: (type_identifier)))
(external_type (external_type
(type_name (type_name
(type_parameters))) name: (type_identifier)
parameters: (type_parameters)))
(external_type (external_type
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter) (type_parameter)
(type_parameter))))) (type_parameter)))))
@ -32,12 +35,15 @@ pub external type Map(key, value)
(source_file (source_file
(public_external_type (public_external_type
(type_name)) (type_name
name: (type_identifier)))
(public_external_type (public_external_type
(type_name (type_name
(type_parameters))) name: (type_identifier)
parameters: (type_parameters)))
(public_external_type (public_external_type
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter) (type_parameter)
(type_parameter))))) (type_parameter)))))

@ -27,11 +27,14 @@ fn replace(
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type))) type: (type
return_type: (type) name: (type_identifier))))
return_type: (type
name: (type_identifier))
(function_body (function_body
(binary_expression (binary_expression
(var) (var)
@ -72,15 +75,18 @@ fn replace(
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type))) type: (type
name: (type_identifier))))
(function_body (function_body
(function_call (function_call
(field_access (field_access
@ -126,11 +132,14 @@ pub fn replace(
parameters: (function_parameters parameters: (function_parameters
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
name: (identifier) name: (identifier)
type: (type))) type: (type
return_type: (type) name: (type_identifier))))
return_type: (type
name: (type_identifier))
(function_body (function_body
(binary_expression (binary_expression
(var) (var)
@ -171,15 +180,18 @@ pub fn replace(
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type)) type: (type
name: (type_identifier)))
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type))) type: (type
name: (type_identifier))))
(function_body (function_body
(function_call (function_call
(field_access (field_access
@ -294,22 +306,22 @@ fn field_access(x) {
name: (identifier) name: (identifier)
(function_body (function_body
(record (record
(record_name) name: (type_identifier)
(arguments arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string)))))) value: (string))))))
(function (function
name: (identifier) name: (identifier)
(function_body (function_body
(remote_record (record
module: (identifier) name: (remote_type_identifier
(record module: (identifier)
(record_name) name: (type_identifier))
(arguments arguments: (arguments
(argument (argument
label: (identifier) label: (identifier)
value: (string))))))) value: (string))))))
(function (function
name: (identifier) name: (identifier)
parameters: (function_parameters parameters: (function_parameters
@ -374,7 +386,8 @@ fn field_access(x) {
(function_parameter (function_parameter
label: (identifier) label: (identifier)
name: (identifier) name: (identifier)
type: (type))) type: (type
name: (type_identifier))))
(function_body (function_body
(binary_expression (binary_expression
(var) (var)
@ -408,13 +421,13 @@ fn field_access(x) {
(integer) (integer)
(integer))) (integer)))
(record (record
(record_name))) name: (type_identifier)))
(case_clause (case_clause
patterns: (case_clause_patterns patterns: (case_clause_patterns
(case_clause_pattern (case_clause_pattern
(discard_var))) (discard_var)))
(record (record
(record_name)))))) name: (type_identifier))))))
(function (function
name: (identifier) name: (identifier)
(function_body (function_body
@ -462,7 +475,7 @@ fn field_access(x) {
name: (identifier))) name: (identifier)))
(function_body (function_body
(record_update (record_update
constructor: (record_name) constructor: (type_identifier)
spread: (var) spread: (var)
arguments: (record_update_arguments arguments: (record_update_arguments
(record_update_argument (record_update_argument
@ -474,9 +487,9 @@ fn field_access(x) {
(integer) (integer)
(integer))))) (integer)))))
(record_update (record_update
constructor: (remote_record_name constructor: (remote_type_identifier
module: (identifier) module: (identifier)
(record_name)) name: (type_identifier))
spread: (function_call spread: (function_call
(var) (var)
(arguments)) (arguments))
@ -577,7 +590,7 @@ fn trial(x, y) {
index: (integer)) index: (integer))
(integer))) (integer)))
(record (record
(record_name))) name: (type_identifier)))
(case_clause (case_clause
patterns: (case_clause_patterns patterns: (case_clause_patterns
(case_clause_pattern (case_clause_pattern
@ -599,7 +612,7 @@ fn trial(x, y) {
index: (integer)) index: (integer))
(integer)))) (integer))))
(record (record
(record_name)))) name: (type_identifier))))
(case (case
subjects: (case_subjects subjects: (case_subjects
(tuple (tuple
@ -649,7 +662,8 @@ fn try_try_again(x, y) -> Int {
name: (identifier)) name: (identifier))
(function_parameter (function_parameter
name: (identifier))) name: (identifier)))
return_type: (type) return_type: (type
name: (type_identifier))
(function_body (function_body
(try (try
pattern: (var) pattern: (var)
@ -658,11 +672,15 @@ fn try_try_again(x, y) -> Int {
pattern: (discard_var) pattern: (discard_var)
value: (todo)) value: (todo))
(try (try
pattern: (remote_constructor_pattern pattern: (constructor_pattern
(pattern_constructor_args)) name: (remote_type_identifier
module: (identifier)
name: (type_identifier))
arguments: (pattern_constructor_arguments))
value: (todo)) value: (todo))
(try (try
pattern: (constructor_pattern) pattern: (constructor_pattern
name: (type_identifier))
value: (todo)) value: (todo))
(try (try
pattern: (string) pattern: (string)

@ -53,8 +53,8 @@ import a/.{b, d}
(unqualified_import (unqualified_import
name: (identifier)) name: (identifier))
(unqualified_import (unqualified_import
name: (record_name) name: (type_identifier)
alias: (record_name)))) alias: (type_identifier))))
(import (import
module: (module) module: (module)
(ERROR) (ERROR)
@ -88,8 +88,8 @@ import animal.{Cat as kitty}
module: (module) module: (module)
imports: (unqualified_imports imports: (unqualified_imports
(unqualified_import (unqualified_import
name: (record_name) name: (type_identifier)
alias: (record_name))) alias: (type_identifier)))
alias: (identifier)) alias: (identifier))
(ERROR (ERROR
(module)) (module))
@ -97,6 +97,6 @@ import animal.{Cat as kitty}
module: (module) module: (module)
imports: (unqualified_imports imports: (unqualified_imports
(unqualified_import (unqualified_import
name: (record_name)) name: (type_identifier))
(ERROR (ERROR
(UNEXPECTED 'k'))))) (UNEXPECTED 'k')))))

@ -11,25 +11,32 @@ type NamedBox(a) = #(String, a)
(source_file (source_file
(type_alias (type_alias
(type_name) (type_name
name: (type_identifier))
(type (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(tuple_type (tuple_type
(type) (type
(type)))))) name: (type_identifier))
(type
name: (type_identifier)))))))
(type_alias (type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type_var))) (type_var)))
(type_alias (type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type) (type
name: (type_identifier))
(type_var)))) (type_var))))
=================== ===================
@ -45,25 +52,32 @@ pub type NamedBox(a) = #(String, a)
(source_file (source_file
(public_type_alias (public_type_alias
(type_name) (type_name
name: (type_identifier))
(type (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(tuple_type (tuple_type
(type) (type
(type)))))) name: (type_identifier))
(type
name: (type_identifier)))))))
(public_type_alias (public_type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type_var))) (type_var)))
(public_type_alias (public_type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type) (type
name: (type_identifier))
(type_var)))) (type_var))))
========================== ==========================
@ -79,23 +93,30 @@ pub opaque type NamedBox(a) = #(String, a)
(source_file (source_file
(public_opaque_type_alias (public_opaque_type_alias
(type_name) (type_name
name: (type_identifier))
(type (type
(type_arguments name: (type_identifier)
arguments: (type_arguments
(type_argument (type_argument
(tuple_type (tuple_type
(type) (type
(type)))))) name: (type_identifier))
(type
name: (type_identifier)))))))
(public_opaque_type_alias (public_opaque_type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type_var))) (type_var)))
(public_opaque_type_alias (public_opaque_type_alias
(type_name (type_name
(type_parameters name: (type_identifier)
parameters: (type_parameters
(type_parameter))) (type_parameter)))
(tuple_type (tuple_type
(type) (type
name: (type_identifier))
(type_var)))) (type_var))))

@ -4,7 +4,6 @@ module.exports = grammar({
name: "gleam", name: "gleam",
extras: ($) => [";", NEWLINE, /\s/], extras: ($) => [";", NEWLINE, /\s/],
conflicts: ($) => [ conflicts: ($) => [
[$.record, $.record_name],
[$.var, $.identifier], [$.var, $.identifier],
[$._maybe_record_expression, $._maybe_tuple_expression], [$._maybe_record_expression, $._maybe_tuple_expression],
], ],
@ -65,8 +64,8 @@ module.exports = grammar({
optional(seq("as", field("alias", $.identifier))) optional(seq("as", field("alias", $.identifier)))
), ),
seq( seq(
field("name", $.record_name), field("name", $.type_identifier),
optional(seq("as", field("alias", $.record_name))) optional(seq("as", field("alias", $.type_identifier)))
) )
), ),
@ -86,41 +85,34 @@ module.exports = grammar({
$.string, $.string,
$.float, $.float,
$.integer, $.integer,
alias($._constant_tuple, $.tuple), alias($.constant_tuple, $.tuple),
alias($._constant_list, $.list), alias($.constant_list, $.list),
alias($._constant_bit_string, $.bit_string), alias($._constant_bit_string, $.bit_string),
alias($._constant_record, $.record), alias($.constant_record, $.record)
alias($._constant_remote_record, $.remote_record)
), ),
_constant_tuple: ($) => constant_tuple: ($) =>
seq("#", "(", optional(series_of($._constant_value, ",")), ")"), seq("#", "(", optional(series_of($._constant_value, ",")), ")"),
_constant_list: ($) => constant_list: ($) =>
seq("[", optional(series_of($._constant_value, ",")), "]"), seq("[", optional(series_of($._constant_value, ",")), "]"),
...bit_string_rules("constant", "_constant_value", "integer"), ...bit_string_rules("constant", "_constant_value", "integer"),
_constant_record: ($) => constant_record: ($) =>
seq( seq(
$.record_name, field("name", choice($.type_identifier, $.remote_type_identifier)),
optional(alias($._constant_record_arguments, $.arguments)) optional(
field("arguments", alias($.constant_record_arguments, $.arguments))
)
), ),
_constant_record_arguments: ($) => constant_record_arguments: ($) =>
seq( seq(
"(", "(",
optional( optional(series_of(alias($.constant_record_argument, $.argument), ",")),
series_of(alias($._constant_record_argument, $.argument), ",")
),
")" ")"
), ),
_constant_record_argument: ($) => constant_record_argument: ($) =>
seq( seq(
optional(seq(field("label", $.identifier), ":")), optional(seq(field("label", $.identifier), ":")),
field("value", $._constant_value) field("value", $._constant_value)
), ),
_constant_remote_record: ($) =>
seq(
field("module", alias($._name, $.identifier)),
".",
$._constant_record
),
/* Special constant types */ /* Special constant types */
// Versions of $._type, $._type_annotation, etc, that have constraints // Versions of $._type, $._type_annotation, etc, that have constraints
@ -129,16 +121,17 @@ module.exports = grammar({
choice( choice(
$.type_hole, $.type_hole,
alias($.constant_tuple_type, $.tuple_type), alias($.constant_tuple_type, $.tuple_type),
alias($.constant_type, $.type), alias($.constant_type, $.type)
alias($.constant_remote_type, $.remote_type)
), ),
_constant_type_annotation: ($) => seq(":", field("type", $._constant_type)), _constant_type_annotation: ($) => seq(":", field("type", $._constant_type)),
constant_tuple_type: ($) => constant_tuple_type: ($) =>
seq("#", "(", optional(series_of($._constant_type, ",")), ")"), seq("#", "(", optional(series_of($._constant_type, ",")), ")"),
constant_type: ($) => constant_type: ($) =>
seq( seq(
$._upname, field("name", choice($.type_identifier, $.remote_type_identifier)),
optional(alias($.constant_type_arguments, $.type_arguments)) optional(
field("arguments", alias($.constant_type_arguments, $.type_arguments))
)
), ),
constant_type_arguments: ($) => constant_type_arguments: ($) =>
seq( seq(
@ -150,9 +143,6 @@ module.exports = grammar({
), ),
constant_type_argument: ($) => $._constant_type, constant_type_argument: ($) => $._constant_type,
constant_remote_type: ($) =>
seq(field("module", $.identifier), ".", alias($.constant_type, $.type)),
/* External types */ /* External types */
public_external_type: ($) => seq("pub", $._external_type), public_external_type: ($) => seq("pub", $._external_type),
external_type: ($) => $._external_type, external_type: ($) => $._external_type,
@ -165,7 +155,7 @@ module.exports = grammar({
seq( seq(
"external", "external",
"fn", "fn",
field("name", alias($._name, $.function_name)), field("name", $.identifier),
"(", "(",
optional( optional(
field( field(
@ -296,7 +286,6 @@ module.exports = grammar({
// If we decide that record constructors (value constructors) are // If we decide that record constructors (value constructors) are
// actually functions, this will require a refactor. // actually functions, this will require a refactor.
$.record, $.record,
$.remote_record,
$.var, $.var,
$.todo, $.todo,
$.tuple, $.tuple,
@ -312,8 +301,11 @@ module.exports = grammar({
$.field_access, $.field_access,
$.function_call $.function_call
), ),
record: ($) => seq(alias($._upname, $.record_name), optional($.arguments)), record: ($) =>
remote_record: ($) => seq(field("module", $.identifier), ".", $.record), seq(
field("name", choice($.type_identifier, $.remote_type_identifier)),
field("arguments", optional($.arguments))
),
todo: ($) => todo: ($) =>
seq("todo", optional(seq("(", field("message", $.string), ")"))), seq("todo", optional(seq("(", field("message", $.string), ")"))),
tuple: ($) => seq("#", "(", optional(series_of($._expression, ",")), ")"), tuple: ($) => seq("#", "(", optional(series_of($._expression, ",")), ")"),
@ -471,14 +463,8 @@ module.exports = grammar({
seq("{", $._case_clause_guard_expression, "}"), seq("{", $._case_clause_guard_expression, "}"),
$._constant_value $._constant_value
), ),
// Somehow writing alias($._name, $.var) vs just $.var solves a precedence
// issue with tree-sitter
_case_clause_tuple_access: ($) => _case_clause_tuple_access: ($) =>
seq( seq(field("tuple", $.var), ".", field("index", $.integer)),
field("tuple", alias($._name, $.var)),
".",
field("index", $.integer)
),
let: ($) => seq("let", $._assignment), let: ($) => seq("let", $._assignment),
assert: ($) => seq("assert", $._assignment), assert: ($) => seq("assert", $._assignment),
_assignment: ($) => _assignment: ($) =>
@ -490,7 +476,10 @@ module.exports = grammar({
), ),
record_update: ($) => record_update: ($) =>
seq( seq(
field("constructor", choice($.record_name, $.remote_record_name)), field(
"constructor",
choice($.type_identifier, $.remote_type_identifier)
),
"(", "(",
"..", "..",
field("spread", $._expression), field("spread", $._expression),
@ -530,7 +519,6 @@ module.exports = grammar({
_maybe_record_expression: ($) => _maybe_record_expression: ($) =>
choice( choice(
$.record, $.record,
$.remote_record,
$.var, $.var,
$.function_call, $.function_call,
$.expression_group, $.expression_group,
@ -577,7 +565,6 @@ module.exports = grammar({
choice( choice(
$.var, $.var,
$.discard_var, $.discard_var,
$.remote_constructor_pattern,
$.constructor_pattern, $.constructor_pattern,
$.string, $.string,
$.integer, $.integer,
@ -586,28 +573,29 @@ module.exports = grammar({
alias($._pattern_bit_string, $.bit_string_pattern), alias($._pattern_bit_string, $.bit_string_pattern),
$.list_pattern $.list_pattern
), ),
optional(field("assign", seq("as", alias($._name, $.pattern_assign)))) optional(field("assign", seq("as", $.pattern_assign)))
), ),
pattern_assign: ($) => $._name,
var: ($) => $._name, var: ($) => $._name,
discard_var: ($) => $._discard_name, discard_var: ($) => $._discard_name,
remote_constructor_pattern: ($) => constructor_pattern: ($) =>
seq($._name, ".", $._constructor_pattern), seq(
constructor_pattern: ($) => $._constructor_pattern, field("name", choice($.type_identifier, $.remote_type_identifier)),
_constructor_pattern: ($) => optional(field("arguments", $.pattern_constructor_arguments))
seq($._upname, optional($.pattern_constructor_args)), ),
pattern_constructor_args: ($) => pattern_constructor_arguments: ($) =>
seq( seq(
"(", "(",
optional(series_of($._pattern_constructor_arg, ",")), optional(series_of($._pattern_constructor_argument, ",")),
optional($.pattern_spread), optional($.pattern_spread),
")" ")"
), ),
_pattern_constructor_arg: ($) => _pattern_constructor_argument: ($) =>
choice( choice(
$.pattern_constructor_named_arg, $.pattern_constructor_named_argument,
alias($.constructor_pattern, $.pattern_constructor_unnamed_arg) alias($.constructor_pattern, $.pattern_constructor_unnamed_argument)
), ),
pattern_constructor_named_arg: ($) => pattern_constructor_named_argument: ($) =>
seq($._name, ":", $.constructor_pattern), seq($._name, ":", $.constructor_pattern),
pattern_spread: ($) => seq("..", optional(",")), pattern_spread: ($) => seq("..", optional(",")),
tuple_pattern: ($) => tuple_pattern: ($) =>
@ -618,9 +606,9 @@ module.exports = grammar({
...bit_string_rules( ...bit_string_rules(
"pattern", "pattern",
"_pattern", "_pattern",
"_pattern_bit_string_segment_arg" "_pattern_bit_string_segment_argument"
), ),
_pattern_bit_string_segment_arg: ($) => choice($.var, $.integer), _pattern_bit_string_segment_argument: ($) => choice($.var, $.integer),
list_pattern: ($) => list_pattern: ($) =>
seq( seq(
"[", "[",
@ -644,11 +632,11 @@ module.exports = grammar({
type_constructors: ($) => repeat1($.type_constructor), type_constructors: ($) => repeat1($.type_constructor),
type_constructor: ($) => type_constructor: ($) =>
seq( seq(
$._upname, field("name", $.type_identifier),
optional(seq("(", optional($.type_constructor_arguments), ")")) optional(field("arguments", $.type_constructor_arguments))
), ),
type_constructor_arguments: ($) => type_constructor_arguments: ($) =>
series_of($.type_constructor_argument, ","), seq("(", optional(series_of($.type_constructor_argument, ",")), ")"),
type_constructor_argument: ($) => type_constructor_argument: ($) =>
seq( seq(
optional(seq(field("label", $.identifier), ":")), optional(seq(field("label", $.identifier), ":")),
@ -696,14 +684,7 @@ module.exports = grammar({
/* Types */ /* Types */
_type: ($) => _type: ($) =>
choice( choice($.type_hole, $.tuple_type, $.function_type, $.type, $.type_var),
$.type_hole,
$.tuple_type,
$.function_type,
$.type,
$.remote_type,
$.type_var
),
_type_annotation: ($) => seq(":", field("type", $._type)), _type_annotation: ($) => seq(":", field("type", $._type)),
type_hole: ($) => $._discard_name, type_hole: ($) => $._discard_name,
// If you're wondering why there isn't a `list_type` here, the answer is // If you're wondering why there isn't a `list_type` here, the answer is
@ -720,29 +701,34 @@ module.exports = grammar({
function_parameter_types: ($) => function_parameter_types: ($) =>
seq("(", optional(series_of($._type, ",")), ")"), seq("(", optional(series_of($._type, ",")), ")"),
// "type" is a somewhat ambiguous name, but it refers to a concrete type // "type" is a somewhat ambiguous name, but it refers to a concrete type
// such as `Bool` or `List(Int)` or even `List(#(Int, String))`. // such as `Bool` or `List(Int)` or even `result.Result(#(Int, Int), Nil)`.
type: ($) => seq($._upname, field("arguments", optional($.type_arguments))), type: ($) =>
seq(
field("name", choice($.type_identifier, $.remote_type_identifier)),
field("arguments", optional($.type_arguments))
),
type_arguments: ($) => type_arguments: ($) =>
seq("(", optional(series_of($.type_argument, ",")), ")"), seq("(", optional(series_of($.type_argument, ",")), ")"),
type_argument: ($) => $._type, type_argument: ($) => $._type,
remote_type: ($) => seq(field("module", $.identifier), ".", $.type),
type_var: ($) => $._name, type_var: ($) => $._name,
// "type_name" referes essentially to the declaration of a type. The type // "type_name" essentially refers to the declaration of a type. The type
// parameters are part of the "name." Bit odd, but 🤷 // parameters are part of the "name." Bit odd, but 🤷
// e.g. MyType(a, b) // e.g. MyType(a, b)
type_name: ($) => seq($._upname, optional($.type_parameters)), type_name: ($) =>
seq(
field("name", choice($.type_identifier, $.remote_type_identifier)),
optional(field("parameters", $.type_parameters))
),
type_parameters: ($) => type_parameters: ($) =>
seq("(", optional(series_of($.type_parameter, ",")), ")"), seq("(", optional(series_of($.type_parameter, ",")), ")"),
type_parameter: ($) => $._name, type_parameter: ($) => $._name,
remote_type_name: ($) =>
seq(field("module", $.identifier), ".", $.type_name),
/* Shared AST nodes */ /* Shared AST nodes */
identifier: ($) => $._name, identifier: ($) => $._name,
record_name: ($) => $._upname, type_identifier: ($) => $._upname,
remote_record_name: ($) => remote_type_identifier: ($) =>
seq(field("module", $.identifier), ".", $.record_name), seq(field("module", $.identifier), ".", field("name", $.type_identifier)),
/* Reused types from the Gleam lexer */ /* Reused types from the Gleam lexer */
_discard_name: ($) => /_[_0-9a-z]*/, _discard_name: ($) => /_[_0-9a-z]*/,

@ -401,7 +401,7 @@
"name": "name", "name": "name",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "record_name" "name": "type_identifier"
} }
}, },
{ {
@ -419,7 +419,7 @@
"name": "alias", "name": "alias",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "record_name" "name": "type_identifier"
} }
} }
] ]
@ -510,7 +510,7 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_tuple" "name": "constant_tuple"
}, },
"named": true, "named": true,
"value": "tuple" "value": "tuple"
@ -519,7 +519,7 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_list" "name": "constant_list"
}, },
"named": true, "named": true,
"value": "list" "value": "list"
@ -537,23 +537,14 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_record" "name": "constant_record"
}, },
"named": true, "named": true,
"value": "record" "value": "record"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_constant_remote_record"
},
"named": true,
"value": "remote_record"
} }
] ]
}, },
"_constant_tuple": { "constant_tuple": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -603,7 +594,7 @@
} }
] ]
}, },
"_constant_list": { "constant_list": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -829,24 +820,41 @@
} }
] ]
}, },
"_constant_record": { "constant_record": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "record_name" "name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "ALIAS", "type": "FIELD",
"name": "arguments",
"content": { "content": {
"type": "SYMBOL", "type": "ALIAS",
"name": "_constant_record_arguments" "content": {
}, "type": "SYMBOL",
"named": true, "name": "constant_record_arguments"
"value": "arguments" },
"named": true,
"value": "arguments"
}
}, },
{ {
"type": "BLANK" "type": "BLANK"
@ -855,7 +863,7 @@
} }
] ]
}, },
"_constant_record_arguments": { "constant_record_arguments": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -872,7 +880,7 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_record_argument" "name": "constant_record_argument"
}, },
"named": true, "named": true,
"value": "argument" "value": "argument"
@ -890,7 +898,7 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_record_argument" "name": "constant_record_argument"
}, },
"named": true, "named": true,
"value": "argument" "value": "argument"
@ -911,7 +919,7 @@
} }
] ]
}, },
"_constant_record_argument": { "constant_record_argument": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -949,32 +957,6 @@
} }
] ]
}, },
"_constant_remote_record": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "module",
"content": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_name"
},
"named": true,
"value": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "_constant_record"
}
]
},
"_constant_type": { "_constant_type": {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
@ -999,15 +981,6 @@
}, },
"named": true, "named": true,
"value": "type" "value": "type"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "constant_remote_type"
},
"named": true,
"value": "remote_type"
} }
] ]
}, },
@ -1082,20 +1055,37 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "_upname" "name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "ALIAS", "type": "FIELD",
"name": "arguments",
"content": { "content": {
"type": "SYMBOL", "type": "ALIAS",
"name": "constant_type_arguments" "content": {
}, "type": "SYMBOL",
"named": true, "name": "constant_type_arguments"
"value": "type_arguments" },
"named": true,
"value": "type_arguments"
}
}, },
{ {
"type": "BLANK" "type": "BLANK"
@ -1164,32 +1154,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_constant_type" "name": "_constant_type"
}, },
"constant_remote_type": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "module",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "constant_type"
},
"named": true,
"value": "type"
}
]
},
"public_external_type": { "public_external_type": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
@ -1256,13 +1220,8 @@
"type": "FIELD", "type": "FIELD",
"name": "name", "name": "name",
"content": { "content": {
"type": "ALIAS", "type": "SYMBOL",
"content": { "name": "identifier"
"type": "SYMBOL",
"name": "_name"
},
"named": true,
"value": "function_name"
} }
}, },
{ {
@ -2162,10 +2121,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "record" "name": "record"
}, },
{
"type": "SYMBOL",
"name": "remote_record"
},
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "var" "name": "var"
@ -2233,46 +2188,37 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "ALIAS", "type": "FIELD",
"name": "name",
"content": { "content": {
"type": "SYMBOL", "type": "CHOICE",
"name": "_upname" "members": [
}, {
"named": true, "type": "SYMBOL",
"value": "record_name" "name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
}
]
},
"remote_record": {
"type": "SEQ",
"members": [
{ {
"type": "FIELD", "type": "FIELD",
"name": "module", "name": "arguments",
"content": { "content": {
"type": "SYMBOL", "type": "CHOICE",
"name": "identifier" "members": [
{
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
} }
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "record"
} }
] ]
}, },
@ -3208,13 +3154,8 @@
"type": "FIELD", "type": "FIELD",
"name": "tuple", "name": "tuple",
"content": { "content": {
"type": "ALIAS", "type": "SYMBOL",
"content": { "name": "var"
"type": "SYMBOL",
"name": "_name"
},
"named": true,
"value": "var"
} }
}, },
{ {
@ -3305,11 +3246,11 @@
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "record_name" "name": "type_identifier"
}, },
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "remote_record_name" "name": "remote_type_identifier"
} }
] ]
} }
@ -3467,10 +3408,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "record" "name": "record"
}, },
{
"type": "SYMBOL",
"name": "remote_record"
},
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "var" "name": "var"
@ -3688,10 +3625,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "discard_var" "name": "discard_var"
}, },
{
"type": "SYMBOL",
"name": "remote_constructor_pattern"
},
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "constructor_pattern" "name": "constructor_pattern"
@ -3741,13 +3674,8 @@
"value": "as" "value": "as"
}, },
{ {
"type": "ALIAS", "type": "SYMBOL",
"content": { "name": "pattern_assign"
"type": "SYMBOL",
"name": "_name"
},
"named": true,
"value": "pattern_assign"
} }
] ]
} }
@ -3759,6 +3687,10 @@
} }
] ]
}, },
"pattern_assign": {
"type": "SYMBOL",
"name": "_name"
},
"var": { "var": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_name" "name": "_name"
@ -3767,40 +3699,36 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_discard_name" "name": "_discard_name"
}, },
"remote_constructor_pattern": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_name"
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "_constructor_pattern"
}
]
},
"constructor_pattern": { "constructor_pattern": {
"type": "SYMBOL",
"name": "_constructor_pattern"
},
"_constructor_pattern": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "_upname" "name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "pattern_constructor_args" "name": "arguments",
"content": {
"type": "SYMBOL",
"name": "pattern_constructor_arguments"
}
}, },
{ {
"type": "BLANK" "type": "BLANK"
@ -3809,7 +3737,7 @@
} }
] ]
}, },
"pattern_constructor_args": { "pattern_constructor_arguments": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -3824,7 +3752,7 @@
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_pattern_constructor_arg" "name": "_pattern_constructor_argument"
}, },
{ {
"type": "REPEAT", "type": "REPEAT",
@ -3837,7 +3765,7 @@
}, },
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_pattern_constructor_arg" "name": "_pattern_constructor_argument"
} }
] ]
} }
@ -3867,12 +3795,12 @@
} }
] ]
}, },
"_pattern_constructor_arg": { "_pattern_constructor_argument": {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "pattern_constructor_named_arg" "name": "pattern_constructor_named_argument"
}, },
{ {
"type": "ALIAS", "type": "ALIAS",
@ -3881,11 +3809,11 @@
"name": "constructor_pattern" "name": "constructor_pattern"
}, },
"named": true, "named": true,
"value": "pattern_constructor_unnamed_arg" "value": "pattern_constructor_unnamed_argument"
} }
] ]
}, },
"pattern_constructor_named_arg": { "pattern_constructor_named_argument": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -4142,7 +4070,7 @@
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_pattern_bit_string_segment_arg" "name": "_pattern_bit_string_segment_argument"
}, },
"named": true, "named": true,
"value": "bit_string_segment_option_size" "value": "bit_string_segment_option_size"
@ -4153,7 +4081,7 @@
} }
] ]
}, },
"_pattern_bit_string_segment_arg": { "_pattern_bit_string_segment_argument": {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
@ -4342,36 +4270,23 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "_upname" "name": "name",
"content": {
"type": "SYMBOL",
"name": "type_identifier"
}
}, },
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "SEQ", "type": "FIELD",
"members": [ "name": "arguments",
{ "content": {
"type": "STRING", "type": "SYMBOL",
"value": "(" "name": "type_constructor_arguments"
}, }
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_constructor_arguments"
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}, },
{ {
"type": "BLANK" "type": "BLANK"
@ -4384,24 +4299,45 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "STRING",
"name": "type_constructor_argument" "value": "("
}, },
{ {
"type": "REPEAT", "type": "CHOICE",
"content": { "members": [
"type": "SEQ", {
"members": [ "type": "SEQ",
{ "members": [
"type": "STRING", {
"value": "," "type": "SYMBOL",
}, "name": "type_constructor_argument"
{ },
"type": "SYMBOL", {
"name": "type_constructor_argument" "type": "REPEAT",
} "content": {
] "type": "SEQ",
} "members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "type_constructor_argument"
}
]
}
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
} }
] ]
}, },
@ -4776,10 +4712,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "type" "name": "type"
}, },
{
"type": "SYMBOL",
"name": "remote_type"
},
{ {
"type": "SYMBOL", "type": "SYMBOL",
"name": "type_var" "name": "type_var"
@ -4944,8 +4876,21 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "_upname" "name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{ {
"type": "FIELD", "type": "FIELD",
@ -5015,27 +4960,6 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_type" "name": "_type"
}, },
"remote_type": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "module",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "type"
}
]
},
"type_var": { "type_var": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_name" "name": "_name"
@ -5044,15 +4968,32 @@
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "_upname" "name": "name",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_identifier"
},
{
"type": "SYMBOL",
"name": "remote_type_identifier"
}
]
}
}, },
{ {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "type_parameters" "name": "parameters",
"content": {
"type": "SYMBOL",
"name": "type_parameters"
}
}, },
{ {
"type": "BLANK" "type": "BLANK"
@ -5111,36 +5052,15 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_name" "name": "_name"
}, },
"remote_type_name": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "module",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "type_name"
}
]
},
"identifier": { "identifier": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_name" "name": "_name"
}, },
"record_name": { "type_identifier": {
"type": "SYMBOL", "type": "SYMBOL",
"name": "_upname" "name": "_upname"
}, },
"remote_record_name": { "remote_type_identifier": {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
{ {
@ -5156,8 +5076,12 @@
"value": "." "value": "."
}, },
{ {
"type": "SYMBOL", "type": "FIELD",
"name": "record_name" "name": "name",
"content": {
"type": "SYMBOL",
"name": "type_identifier"
}
} }
] ]
}, },
@ -5189,10 +5113,6 @@
} }
], ],
"conflicts": [ "conflicts": [
[
"record",
"record_name"
],
[ [
"var", "var",
"identifier" "identifier"

@ -21,10 +21,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -133,10 +129,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -230,10 +222,6 @@
"type": "pattern_assign", "type": "pattern_assign",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -256,10 +244,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -338,10 +322,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -430,10 +410,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -599,14 +575,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -699,10 +667,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -925,10 +889,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -984,10 +944,6 @@
"type": "record", "type": "record",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1054,10 +1010,6 @@
"type": "list_pattern", "type": "list_pattern",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1152,10 +1104,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1197,10 +1145,6 @@
"multiple": false, "multiple": false,
"required": false, "required": false,
"types": [ "types": [
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1239,10 +1183,6 @@
"type": "record", "type": "record",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1258,16 +1198,31 @@
{ {
"type": "constructor_pattern", "type": "constructor_pattern",
"named": true, "named": true,
"fields": {}, "fields": {
"children": { "arguments": {
"multiple": false, "multiple": false,
"required": false, "required": false,
"types": [ "types": [
{ {
"type": "pattern_constructor_args", "type": "pattern_constructor_arguments",
"named": true "named": true
} }
] ]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
}
} }
}, },
{ {
@ -1339,10 +1294,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1389,7 +1340,7 @@
"required": true, "required": true,
"types": [ "types": [
{ {
"type": "function_name", "type": "identifier",
"named": true "named": true
} }
] ]
@ -1412,10 +1363,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1508,10 +1455,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "tuple_access", "type": "tuple_access",
"named": true "named": true
@ -1556,10 +1499,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1654,10 +1593,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -1760,10 +1695,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1796,10 +1727,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1856,10 +1783,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -1985,10 +1908,6 @@
"type": "pattern_assign", "type": "pattern_assign",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2011,10 +1930,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2093,10 +2008,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2185,10 +2096,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2272,10 +2179,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2350,10 +2253,6 @@
"type": "list_pattern_tail", "type": "list_pattern_tail",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2394,7 +2293,12 @@
"fields": {} "fields": {}
}, },
{ {
"type": "pattern_constructor_args", "type": "pattern_assign",
"named": true,
"fields": {}
},
{
"type": "pattern_constructor_arguments",
"named": true, "named": true,
"fields": {}, "fields": {},
"children": { "children": {
@ -2402,11 +2306,11 @@
"required": false, "required": false,
"types": [ "types": [
{ {
"type": "pattern_constructor_named_arg", "type": "pattern_constructor_named_argument",
"named": true "named": true
}, },
{ {
"type": "pattern_constructor_unnamed_arg", "type": "pattern_constructor_unnamed_argument",
"named": true "named": true
}, },
{ {
@ -2417,7 +2321,7 @@
} }
}, },
{ {
"type": "pattern_constructor_named_arg", "type": "pattern_constructor_named_argument",
"named": true, "named": true,
"fields": {}, "fields": {},
"children": { "children": {
@ -2432,18 +2336,33 @@
} }
}, },
{ {
"type": "pattern_constructor_unnamed_arg", "type": "pattern_constructor_unnamed_argument",
"named": true, "named": true,
"fields": {}, "fields": {
"children": { "arguments": {
"multiple": false, "multiple": false,
"required": false, "required": false,
"types": [ "types": [
{ {
"type": "pattern_constructor_args", "type": "pattern_constructor_arguments",
"named": true "named": true
} }
] ]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
}
} }
}, },
{ {
@ -2469,10 +2388,6 @@
"multiple": false, "multiple": false,
"required": false, "required": false,
"types": [ "types": [
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2511,10 +2426,6 @@
"type": "record", "type": "record",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -2546,7 +2457,7 @@
"required": true, "required": true,
"types": [ "types": [
{ {
"type": "function_name", "type": "identifier",
"named": true "named": true
} }
] ]
@ -2569,10 +2480,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2640,10 +2547,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2686,10 +2589,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2744,10 +2643,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -2793,27 +2688,33 @@
{ {
"type": "record", "type": "record",
"named": true, "named": true,
"fields": {}, "fields": {
"children": { "arguments": {
"multiple": true, "multiple": false,
"required": true, "required": false,
"types": [ "types": [
{ {
"type": "arguments", "type": "arguments",
"named": true "named": true
}, }
{ ]
"type": "record_name", },
"named": true "name": {
} "multiple": false,
] "required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
}
} }
}, },
{
"type": "record_name",
"named": true,
"fields": {}
},
{ {
"type": "record_update", "type": "record_update",
"named": true, "named": true,
@ -2833,11 +2734,11 @@
"required": true, "required": true,
"types": [ "types": [
{ {
"type": "record_name", "type": "remote_type_identifier",
"named": true "named": true
}, },
{ {
"type": "remote_record_name", "type": "type_identifier",
"named": true "named": true
} }
] ]
@ -2902,10 +2803,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3004,10 +2901,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3048,22 +2941,7 @@
} }
}, },
{ {
"type": "remote_constructor_pattern", "type": "remote_type_identifier",
"named": true,
"fields": {},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "pattern_constructor_args",
"named": true
}
]
}
},
{
"type": "remote_record",
"named": true, "named": true,
"fields": { "fields": {
"module": { "module": {
@ -3075,77 +2953,17 @@
"named": true "named": true
} }
] ]
} },
}, "name": {
"children": {
"multiple": true,
"required": true,
"types": [
{
"type": "arguments",
"named": true
},
{
"type": "record",
"named": true
},
{
"type": "record_name",
"named": true
}
]
}
},
{
"type": "remote_record_name",
"named": true,
"fields": {
"module": {
"multiple": false,
"required": true,
"types": [
{
"type": "identifier",
"named": true
}
]
}
},
"children": {
"multiple": false,
"required": true,
"types": [
{
"type": "record_name",
"named": true
}
]
}
},
{
"type": "remote_type",
"named": true,
"fields": {
"module": {
"multiple": false, "multiple": false,
"required": true, "required": true,
"types": [ "types": [
{ {
"type": "identifier", "type": "type_identifier",
"named": true "named": true
} }
] ]
} }
},
"children": {
"multiple": false,
"required": true,
"types": [
{
"type": "type",
"named": true
}
]
} }
}, },
{ {
@ -3380,10 +3198,6 @@
"type": "pattern_assign", "type": "pattern_assign",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3406,10 +3220,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -3488,10 +3298,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3580,10 +3386,6 @@
"type": "record_update", "type": "record_update",
"named": true "named": true
}, },
{
"type": "remote_record",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3704,10 +3506,6 @@
"type": "list_pattern", "type": "list_pattern",
"named": true "named": true
}, },
{
"type": "remote_constructor_pattern",
"named": true
},
{ {
"type": "string", "type": "string",
"named": true "named": true
@ -3735,10 +3533,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -3771,17 +3565,21 @@
"named": true "named": true
} }
] ]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "remote_type_identifier",
"named": true
},
{
"type": "type_identifier",
"named": true
}
]
} }
},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "type_arguments",
"named": true
}
]
} }
}, },
{ {
@ -3796,10 +3594,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -3835,10 +3629,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -3876,16 +3666,27 @@
{ {
"type": "type_constructor", "type": "type_constructor",
"named": true, "named": true,
"fields": {}, "fields": {
"children": { "arguments": {
"multiple": false, "multiple": false,
"required": false, "required": false,
"types": [ "types": [
{ {
"type": "type_constructor_arguments", "type": "type_constructor_arguments",
"named": true "named": true
} }
] ]
},
"name": {
"multiple": false,
"required": true,
"types": [
{
"type": "type_identifier",
"named": true
}
]
}
} }
}, },
{ {
@ -3910,10 +3711,6 @@
"type": "function_type", "type": "function_type",
"named": true "named": true
}, },
{
"type": "remote_type",
"named": true
},
{ {
"type": "tuple_type", "type": "tuple_type",
"named": true "named": true
@ -3940,7 +3737,7 @@
"fields": {}, "fields": {},
"children": { "children": {
"multiple": true, "multiple": true,
"required": true, "required": false,
"types": [ "types": [
{ {
"type": "type_constructor_argument", "type": "type_constructor_argument",
@ -3988,19 +3785,39 @@
"named": true, "named": true,
"fields": {} "fields": {}
}, },
{
"type": "type_identifier",
"named": true,
"fields": {}
},
{ {
"type": "type_name", "type": "type_name",
"named": true, "named": true,
"fields": {}, "fields": {
"children": { "name": {
"multiple": false, "multiple": false,
"required": false, "required": true,
"types": [ "types": [
{ {
"type": "type_parameters", "type": "remote_type_identifier",
"named": true "named": true
} },
] {
"type": "type_identifier",
"named": true
}
]
},
"parameters": {
"multiple": false,
"required": false,
"types": [
{
"type": "type_parameters",
"named": true
}
]
}
} }
}, },
{ {
@ -4041,7 +3858,7 @@
"named": true "named": true
}, },
{ {
"type": "record_name", "type": "type_identifier",
"named": true "named": true
} }
] ]
@ -4055,7 +3872,7 @@
"named": true "named": true
}, },
{ {
"type": "record_name", "type": "type_identifier",
"named": true "named": true
} }
] ]
@ -4306,10 +4123,6 @@
"type": "fn", "type": "fn",
"named": false "named": false
}, },
{
"type": "function_name",
"named": true
},
{ {
"type": "if", "type": "if",
"named": false "named": false
@ -4330,10 +4143,6 @@
"type": "opaque", "type": "opaque",
"named": false "named": false
}, },
{
"type": "pattern_assign",
"named": true
},
{ {
"type": "pub", "type": "pub",
"named": false "named": false

File diff suppressed because it is too large Load Diff