references deduction in function definitions (reference modifiers can be added to argument names)

This commit is contained in:
ProgramSnail 2023-07-19 10:29:07 +03:00
parent 2e0dfdf3fa
commit 8cc264fa5a
2 changed files with 32 additions and 1 deletions

View file

@ -56,6 +56,7 @@ module.exports = grammar({
choice(field('name', $.simple_name_identifier), seq('(', field('name', $.operator), ')')),
repeat(seq(
optional($.annotation_identifier),
optional(choice(choice('->', 'out'), choice('<-', 'in'), choice('<>', 'ref'))),
$.argument_name_identifier,
optional('?'),
)),