more tree-sitter-y and await expr
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = grammar({
|
|||||||
|
|
||||||
reserved: {
|
reserved: {
|
||||||
toplevel_kw: $ =>
|
toplevel_kw: $ =>
|
||||||
['type', 'with', 'extensible', 'extend', 'union', 'def'],
|
['type', 'with', 'extensible', 'extend', 'union', 'def', 'await', 'if', 'then', 'else', 'in', 'match'],
|
||||||
},
|
},
|
||||||
|
|
||||||
extras: ($) => [
|
extras: ($) => [
|
||||||
@@ -24,6 +24,7 @@ module.exports = grammar({
|
|||||||
|
|
||||||
precedences: _ => [
|
precedences: _ => [
|
||||||
[
|
[
|
||||||
|
"ident",
|
||||||
"exponent",
|
"exponent",
|
||||||
"multiplication",
|
"multiplication",
|
||||||
"negate",
|
"negate",
|
||||||
@@ -35,12 +36,13 @@ module.exports = grammar({
|
|||||||
"let",
|
"let",
|
||||||
"new_match_arm",
|
"new_match_arm",
|
||||||
"match_arm",
|
"match_arm",
|
||||||
|
"await",
|
||||||
"tag",
|
"tag",
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
conflicts: $ => [
|
conflicts: $ => [
|
||||||
[$.match_expr, $.match_expr],
|
[$.match_expr, $.match_expr], // TODO
|
||||||
],
|
],
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@@ -172,8 +174,8 @@ module.exports = grammar({
|
|||||||
list_expression: $ =>
|
list_expression: $ =>
|
||||||
seq(
|
seq(
|
||||||
'[',
|
'[',
|
||||||
repeat(seq($.expression, ',')),
|
repeat(seq($._expression, ',')),
|
||||||
optional($.expression),
|
optional($._expression),
|
||||||
']'),
|
']'),
|
||||||
|
|
||||||
field_access: $ => prec.left(
|
field_access: $ => prec.left(
|
||||||
@@ -181,13 +183,14 @@ module.exports = grammar({
|
|||||||
|
|
||||||
function_call: $ => prec.left(1,
|
function_call: $ => prec.left(1,
|
||||||
seq($._atom, '(',
|
seq($._atom, '(',
|
||||||
repeat(seq($.expression, ',')), optional($.expression),
|
repeat(seq($._expression, ',')), optional($._expression),
|
||||||
')')),
|
')')),
|
||||||
|
|
||||||
ident_expr: $ => $.identifier,
|
ident_expr: $ => prec("ident",
|
||||||
|
$.path),
|
||||||
|
|
||||||
record_expr_field: $ =>
|
record_expr_field: $ =>
|
||||||
seq($.identifier, ':', $.expression),
|
seq($.identifier, ':', $._expression),
|
||||||
|
|
||||||
record_expr: $ => seq(
|
record_expr: $ => seq(
|
||||||
'{',
|
'{',
|
||||||
@@ -196,7 +199,7 @@ module.exports = grammar({
|
|||||||
'}'),
|
'}'),
|
||||||
|
|
||||||
_atom: $ => choice(
|
_atom: $ => choice(
|
||||||
prec(0, seq('(', $.expression, ')')),
|
prec(0, seq('(', $._expression, ')')),
|
||||||
$.ident_expr,
|
$.ident_expr,
|
||||||
$.char_literal,
|
$.char_literal,
|
||||||
$.string_literal,
|
$.string_literal,
|
||||||
@@ -209,86 +212,90 @@ module.exports = grammar({
|
|||||||
|
|
||||||
let_binding: $ => prec("let", seq(
|
let_binding: $ => prec("let", seq(
|
||||||
'let',
|
'let',
|
||||||
$.identifier,
|
field('name', $.identifier),
|
||||||
'=',
|
'=',
|
||||||
$.expression,
|
field('value', $._expression),
|
||||||
optional('in'),
|
optional('in'),
|
||||||
$.expression,
|
field('body', $._expression),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
await_binding: $ => prec("let", seq(
|
await_binding: $ => prec("let", seq(
|
||||||
'await',
|
'await',
|
||||||
$.identifier,
|
field('name', $.identifier),
|
||||||
'=',
|
'=',
|
||||||
$.expression,
|
field('value', $._expression),
|
||||||
optional('in'),
|
optional('in'),
|
||||||
$.expression,
|
field('body', $._expression),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
type_downcast: $ => seq(
|
type_downcast: $ => seq(
|
||||||
$._atom,
|
field('expr', $._atom),
|
||||||
'::',
|
'::',
|
||||||
$._type,
|
field('as', $._type),
|
||||||
),
|
),
|
||||||
|
|
||||||
lambda: $ => prec.right(4, seq(
|
lambda: $ => prec.right(4, seq(
|
||||||
$.identifier,
|
field('arg', $.identifier),
|
||||||
optional(seq(':', $._type_non_fn)),
|
optional(seq(':', field('arg_type', $._type_non_fn))),
|
||||||
'->',
|
'->',
|
||||||
$.expression
|
field('body', $._expression)
|
||||||
)),
|
)),
|
||||||
|
|
||||||
with_expr: $ => prec.left("with",
|
with_expr: $ => prec.left("with",
|
||||||
seq($.expression, 'with', $._atom)),
|
seq($._expression, 'with', $._atom)),
|
||||||
|
|
||||||
and_expr: $ => prec.left("with",
|
and_expr: $ => prec.left("with",
|
||||||
seq($.expression, 'and', $._atom)),
|
seq($._expression, 'and', $._atom)),
|
||||||
|
|
||||||
if_expr: $ => prec("if",
|
if_expr: $ => prec("if",
|
||||||
seq('if', $.expression, 'then', $.expression, 'else', $.expression)),
|
seq('if', $._expression, 'then', $._expression, 'else', $._expression)),
|
||||||
|
|
||||||
sub_expr: $ => prec.left("addition",
|
sub_expr: $ => prec.left("addition",
|
||||||
seq($.expression, '-', $.expression)),
|
seq($._expression, '-', $._expression)),
|
||||||
add_expr: $ => prec.left("addition",
|
add_expr: $ => prec.left("addition",
|
||||||
seq($.expression, '+', $.expression)),
|
seq($._expression, '+', $._expression)),
|
||||||
|
|
||||||
divide_expr: $ => prec.left("multiplication",
|
divide_expr: $ => prec.left("multiplication",
|
||||||
seq($.expression, '/', $.expression)),
|
seq($._expression, '/', $._expression)),
|
||||||
multiply_expr: $ => prec.left("multiplication",
|
multiply_expr: $ => prec.left("multiplication",
|
||||||
seq($.expression, '*', $.expression)),
|
seq($._expression, '*', $._expression)),
|
||||||
|
|
||||||
equal_expr: $ => prec.left("equal",
|
equal_expr: $ => prec.left("equal",
|
||||||
seq($.expression, '=', $.expression)),
|
seq($._expression, '=', $._expression)),
|
||||||
|
|
||||||
concat_expr: $ => prec.left("concat",
|
concat_expr: $ => prec.left("concat",
|
||||||
seq($.expression, '++', $.expression)),
|
seq($._expression, '++', $._expression)),
|
||||||
|
|
||||||
compose_expr: $ => prec.left("concat",
|
compose_expr: $ => prec.left("concat",
|
||||||
seq($.expression, '=>', $.expression)),
|
seq($._expression, '=>', $._expression)),
|
||||||
|
|
||||||
exponent_expr: $ => prec.left("exponent",
|
exponent_expr: $ => prec.left("exponent",
|
||||||
seq($.expression, '^', $._atom)),
|
seq($._expression, '^', $._atom)),
|
||||||
|
|
||||||
match_arm: $ => prec("match_arm",
|
match_arm: $ => prec("match_arm",
|
||||||
seq(
|
seq(
|
||||||
field('cases', seq($._atom, repeat(seq('|', $._atom)))),
|
field('cases', seq($._atom, repeat(seq('|', $._atom)))),
|
||||||
'->', $.expression)),
|
'->', $._expression)),
|
||||||
|
|
||||||
match_expr: $ =>
|
match_expr: $ =>
|
||||||
seq('match', $.expression, 'with',
|
seq('match', $._expression, 'with',
|
||||||
$.match_arm,
|
$.match_arm,
|
||||||
prec("new_match_arm", repeat(seq('|', $.match_arm)))),
|
prec("new_match_arm", repeat(seq('|', $.match_arm)))),
|
||||||
|
|
||||||
negate_expr: $ => prec.right("negate",
|
negate_expr: $ => prec.right("negate",
|
||||||
seq('-', $.expression)),
|
seq('-', $._expression)),
|
||||||
|
|
||||||
tag_expr: $ => prec.right("tag",
|
tag_expr: $ => prec.right("tag",
|
||||||
seq($.tag, $.expression)),
|
seq($.tag, $._expression)),
|
||||||
|
|
||||||
expression: $ => choice(
|
await_expr: $ => prec.right("await",
|
||||||
|
seq('await', $._expression)),
|
||||||
|
|
||||||
|
_expression: $ => choice(
|
||||||
$._atom,
|
$._atom,
|
||||||
$.let_binding,
|
$.let_binding,
|
||||||
$.await_binding,
|
$.await_binding,
|
||||||
|
$.await_expr,
|
||||||
$.type_downcast,
|
$.type_downcast,
|
||||||
$.lambda,
|
$.lambda,
|
||||||
$.with_expr,
|
$.with_expr,
|
||||||
@@ -309,12 +316,13 @@ module.exports = grammar({
|
|||||||
),
|
),
|
||||||
|
|
||||||
def: $ => seq(
|
def: $ => seq(
|
||||||
'def', $.path,
|
'def',
|
||||||
|
field('name', $.path),
|
||||||
choice(
|
choice(
|
||||||
seq(':', $._type),
|
seq(':', field('signature', $._type)),
|
||||||
seq(
|
seq(
|
||||||
optional(seq(':', $._type)),
|
optional(seq(':', field('signature', $._type))),
|
||||||
seq('=', $.expression),
|
seq('=', field('value', $._expression)),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
243
tree-sitter/src/grammar.json
generated
243
tree-sitter/src/grammar.json
generated
@@ -714,7 +714,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -728,7 +728,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
@@ -783,7 +783,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -797,7 +797,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "BLANK"
|
"type": "BLANK"
|
||||||
@@ -812,8 +812,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ident_expr": {
|
"ident_expr": {
|
||||||
"type": "SYMBOL",
|
"type": "PREC",
|
||||||
"name": "identifier"
|
"value": "ident",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "path"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"record_expr_field": {
|
"record_expr_field": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
@@ -828,7 +832,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -888,7 +892,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -942,16 +946,24 @@
|
|||||||
"value": "let"
|
"value": "let"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "identifier"
|
"name": "name",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "="
|
"value": "="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "value",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -966,8 +978,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "body",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -983,16 +999,24 @@
|
|||||||
"value": "await"
|
"value": "await"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "identifier"
|
"name": "name",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "="
|
"value": "="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "value",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1007,8 +1031,12 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "body",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1017,16 +1045,24 @@
|
|||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "_atom"
|
"name": "expr",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_atom"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "::"
|
"value": "::"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "_type"
|
"name": "as",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1037,8 +1073,12 @@
|
|||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "identifier"
|
"name": "arg",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "identifier"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1051,8 +1091,12 @@
|
|||||||
"value": ":"
|
"value": ":"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "_type_non_fn"
|
"name": "arg_type",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_type_non_fn"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1066,8 +1110,12 @@
|
|||||||
"value": "->"
|
"value": "->"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "body",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1080,7 +1128,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1101,7 +1149,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1126,7 +1174,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1134,7 +1182,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1142,7 +1190,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1155,7 +1203,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1163,7 +1211,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1176,7 +1224,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1184,7 +1232,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1197,7 +1245,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1205,7 +1253,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1218,7 +1266,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1226,7 +1274,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1239,7 +1287,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1247,7 +1295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1260,7 +1308,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1268,7 +1316,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1281,7 +1329,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1289,7 +1337,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1302,7 +1350,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1356,7 +1404,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1370,7 +1418,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
@@ -1414,7 +1462,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1431,12 +1479,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "_expression"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"expression": {
|
"await_expr": {
|
||||||
|
"type": "PREC_RIGHT",
|
||||||
|
"value": "await",
|
||||||
|
"content": {
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "await"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_expression": {
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
@@ -1451,6 +1516,10 @@
|
|||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "await_binding"
|
"name": "await_binding"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "await_expr"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "type_downcast"
|
"name": "type_downcast"
|
||||||
@@ -1525,8 +1594,12 @@
|
|||||||
"value": "def"
|
"value": "def"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "path"
|
"name": "name",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "path"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1539,8 +1612,12 @@
|
|||||||
"value": ":"
|
"value": ":"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "_type"
|
"name": "signature",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1558,8 +1635,12 @@
|
|||||||
"value": ":"
|
"value": ":"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "_type"
|
"name": "signature",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_type"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1576,8 +1657,12 @@
|
|||||||
"value": "="
|
"value": "="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "FIELD",
|
||||||
"name": "expression"
|
"name": "value",
|
||||||
|
"content": {
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "_expression"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1606,6 +1691,10 @@
|
|||||||
],
|
],
|
||||||
"precedences": [
|
"precedences": [
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "ident"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "exponent"
|
"value": "exponent"
|
||||||
@@ -1650,6 +1739,10 @@
|
|||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "match_arm"
|
"value": "match_arm"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "await"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "tag"
|
"value": "tag"
|
||||||
@@ -1684,6 +1777,30 @@
|
|||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "def"
|
"value": "def"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "await"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "if"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "then"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "else"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "in"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "match"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
3427
tree-sitter/src/node-types.json
generated
3427
tree-sitter/src/node-types.json
generated
File diff suppressed because it is too large
Load Diff
54529
tree-sitter/src/parser.c
generated
54529
tree-sitter/src/parser.c
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user