1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-24 17:10:31 +00:00

Fix trailing-comma errors on method calls

We were only matching `f(a, ` patterns, and not `x:f(a, `. We now just
match against any usages of call_args - hadn't quite realised we could
do that!
This commit is contained in:
Jonathan Coates 2023-12-28 17:07:39 +00:00
parent 0349c2b1f9
commit ed3a17f9b9
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 17 additions and 2 deletions

View File

@ -478,6 +478,7 @@ Unexpected ) in function call.
1 | f(2, )
| ^ Tip: Try removing this ,.
```
```lua
f(2, 3, )
```
@ -491,3 +492,17 @@ Unexpected ) in function call.
1 | f(2, 3, )
| ^ Tip: Try removing this ,.
```
```lua
x:f(2, 3, )
```
```txt
Unexpected ) in function call.
|
1 | x:f(2, 3, )
| ^
|
1 | x:f(2, 3, )
| ^ Tip: Try removing this ,.
```