Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Remove MISSING identifier on def foo().
Browse files Browse the repository at this point in the history
For:
```Crystal
def foo_bar()
end
```
It nos generates:

```
source_file [0, 0] - [2, 0]
  def [0, 0] - [1, 3]
    method_def [0, 0] - [1, 3]
      name: identifier [0, 4] - [0, 11]
```

instead of:

```
source_file [0, 0] - [2, 0]
  def [0, 0] - [1, 3]
    method_def [0, 0] - [1, 3]
      name: identifier [0, 4] - [0, 11]
      params: method_param [0, 12] - [0, 12]
        name: MISSING identifier [0, 12] - [0, 12]
```
  • Loading branch information
hugopl committed Nov 29, 2024
1 parent a072c04 commit 9370e9e
Show file tree
Hide file tree
Showing 4 changed files with 11,958 additions and 10,678 deletions.
10 changes: 6 additions & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ module.exports = grammar({
'params',
seq(
'(',
seq(
$.method_param,
repeat(seq(',', $.method_param)),
optional(','),
optional(
seq(
$.method_param,
repeat(seq(',', $.method_param)),
optional(','),
)
),
// optional(seq($.splat_param, optional(','))),
// optional(seq($.double_splat_param, optional(','))),
Expand Down
58 changes: 33 additions & 25 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9370e9e

Please sign in to comment.