Add array types
This commit is contained in:
parent
dd0af53fa0
commit
1e5f7cd5d5
5 changed files with 1529 additions and 1378 deletions
|
|
@ -245,6 +245,7 @@ module.exports = grammar({
|
|||
_type: ($) => choice(
|
||||
$.type_alias,
|
||||
$.record_type,
|
||||
$.array_type,
|
||||
),
|
||||
|
||||
type_alias: ($) => $.identifier,
|
||||
|
|
@ -261,6 +262,12 @@ module.exports = grammar({
|
|||
field("type", $.identifier),
|
||||
),
|
||||
|
||||
array_type: ($) => seq(
|
||||
"array",
|
||||
"of",
|
||||
field("element_type", $.identifier),
|
||||
),
|
||||
|
||||
function_declaration: ($) => seq(
|
||||
"function",
|
||||
$._function_declaration_common,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue