1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 00:57:55 +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
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 ,.
```