Fix calls.

This commit is contained in:
Jesse Brault 2025-09-07 18:37:49 -05:00
parent 4bc89d5ca3
commit bae90b8b80
2 changed files with 26 additions and 0 deletions

View File

@ -560,6 +560,18 @@ ParenthesizedExpression:
# Calls # Calls
Call: Call:
rules:
- ParenthesesCall
- NonParenthesesCall
ParenthesesCall:
children:
- turbo_fish:
optional: true
- expression_list:
optional: true
- closure:
optional: true
NonParenthesesCall:
children: children:
- turbo_fish: - turbo_fish:
optional: true optional: true

View File

@ -755,6 +755,11 @@ ParenthesizedExpression = {
// Calls // Calls
Call = { Call = {
ParenthesesCall
| NonParenthesesCall
}
ParenthesesCall = {
TurboFish? TurboFish?
~ "(" ~ "("
~ ExpressionList? ~ ExpressionList?
@ -762,6 +767,15 @@ Call = {
~ Closure? ~ Closure?
} }
NonParenthesesCall = {
TurboFish?
~ (
Closure
| ExpressionList
| ExpressionList ~ Closure
)
}
TurboFish = { TurboFish = {
"::" "::"
~ GenericArguments ~ GenericArguments