swift-syntax
swift-syntax copied to clipboard
Detect missing comma in function declaration
This PR will make the Parser capable of detect and recover from a missing comma in a function declaration. The motivating example was the following:
func a(foo: Bar foo2: Bar2) {}
--- Before Diagnostics
1 │ func a(foo: Bar foo2: Bar2) {}
∣ ╰─ unexpected text 'foo2: Bar2' in parameter clause
--- After Diagnostics
1 │ func a(foo: Bar foo2: Bar2) {}
∣ ╰─ expected ',' in function parameter