Skip to content

Commit

Permalink
parser: tidy up parameters in method_definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Sep 18, 2024
1 parent 272ea40 commit 69dc86f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ module.exports = grammar({
repeat(choice($.access_tuning, $.scope_tuning, $.method_tuning)),
alias($._type, $.return_type),
field("name", $.identifier),
seq("(", optional(_list($.function_parameter, ",")), ")"),
alias($.function_parameters, $.parameters),
optional(seq($.body, kw("END"), optional(kw("METHOD")))),
$._terminator
),
Expand Down
12 changes: 7 additions & 5 deletions test/corpus/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1951,16 +1951,18 @@ END INTERFACE.
(return_type
(primitive_type))
(identifier)
(function_parameter
(function_parameter_mode)
(identifier)
(function_parameter_tuning)))
(parameters
(function_parameter
(function_parameter_mode)
(identifier)
(function_parameter_tuning))))
(comment)
(method_definition
(access_tuning)
(return_type
(primitive_type))
(identifier)))))
(identifier)
(parameters)))))

================================================================================
VAR statement
Expand Down

0 comments on commit 69dc86f

Please sign in to comment.