### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I'm trying to create a state machine using the following definition that I validated on AWS:

```json
{
  "StartAt": "GetSuffix",
  "States": {
    "GetSuffix": {
      "Type": "Pass",
      "Parameters": {
        "suffix.$": "States.ArrayGetItem(States.StringSplit($$.StateMachine.Name, '-'), States.MathAdd(States.ArrayLength(States.StringSplit($$.StateMachine.Name, '-')), -1))"
      },
      "End": true
    }
  }
}
```

It fails with the following error:
```
│ Error: updating Step Functions State Machine (arn:aws:states:eu-west-3:000000000000:stateMachine:my-state-machine): InvalidDefinition: Error=ValueError Args=["Expected 2 arguments for function type '<class 'localstack.services.stepfunctions.asl.component.intrinsic.function.statesfunction.string_operations.string_split.StringSplit'>', but got: '(FunctionArgumentList| {'arg_list': [], 'size': 0}'."] in definition '{
│   "StartAt": "GetSuffix",
│   "States": {
│     "GetSuffix": {
│       "Type": "Pass",
│       "Parameters": {
│         "suffix.$": "States.ArrayGetItem(States.StringSplit($$.StateMachine.Name, '-'), States.MathAdd(States.ArrayLength(States.StringSplit($$.StateMachine.Name, '-')), -1))"
│       },
│       "End": true
│     }
│   }
│ }
│ '.
│ 
│   with aws_sfn_state_machine.main,
│   on stepFunction.tf line 1, in resource "aws_sfn_state_machine" "main":
│    1: resource "aws_sfn_state_machine" "main" {
```

Based on my tests there seems to be 2 issues:
- Using a variable starting with `$$` as a function argument is not supported.
- Passing the result of a function directly as another function argument is not supported.

### Expected Behavior

The definition should be considered valid and the state machine should be created.

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

Create a state machine using the provided definition.

### Environment

```markdown
- LocalStack: 2.3.0
- PROVIDER_OVERRIDE_STEPFUNCTIONS=v2
- Terraform v1.6.2
```


### Anything else?

_No response_
0,331,332,5,100,0,0,332,70,1,0,0,0,333,334,5,83,0,0,334,335,5,116,
        0,0,335,336,5,114,0,0,336,337,5,105,0,0,337,338,5,110,0,0,338,339,
        5,103,0,0,339,340,5,83,0,0,340,341,5,112,0,0,341,342,5,108,0,0,342,
        343,5,105,0,0,343,344,5,116,0,0,344,72,1,0,0,0,345,346,5,85,0,0,
        346,347,5,85,0,0,347,348,5,73,0,0,348,349,5,68,0,0,349,74,1,0,0,
        0,350,355,5,39,0,0,351,354,3,77,38,0,352,354,3,83,41,0,353,351,1,
        0,0,0,353,352,1,0,0,0,354,357,1,0,0,0,355,353,1,0,0,0,355,356,1,
        0,0,0,356,358,1,0,0,0,357,355,1,0,0,0,358,359,5,39,0,0,359,76,1,
        0,0,0,360,363,5,92,0,0,361,364,7,0,0,0,362,364,3,79,39,0,363,361,
        1,0,0,0,363,362,1,0,0,0,364,78,1,0,0,0,365,366,5,117,0,0,366,367,
        3,81,40,0,367,368,3,81,40,0,368,369,3,81,40,0,369,370,3,81,40,0,
        370,80,1,0,0,0,371,372,7,1,0,0,372,82,1,0,0,0,373,374,8,2,0,0,374,
        84,1,0,0,0,375,377,5,45,0,0,376,375,1,0,0,0,376,377,1,0,0,0,377,
        386,1,0,0,0,378,387,5,48,0,0,379,383,7,3,0,0,380,382,7,4,0,0,381,
        380,1,0,0,0,382,385,1,0,0,0,383,381,1,0,0,0,383,384,1,0,0,0,384,
        387,1,0,0,0,385,383,1,0,0,0,386,378,1,0,0,0,386,379,1,0,0,0,387,
        86,1,0,0,0,388,390,5,45,0,0,389,388,1,0,0,0,389,390,1,0,0,0,390,
        391,1,0,0,0,391,398,3,85,42,0,392,394,5,46,0,0,393,395,7,4,0,0,394,
        393,1,0,0,0,395,396,1,0,0,0,396,394,1,0,0,0,396,397,1,0,0,0,397,
        399,1,0,0,0,398,392,1,0,0,0,398,399,1,0,0,0,399,401,1,0,0,0,400,
        402,3,89,44,0,401,400,1,0,0,0,401,402,1,0,0,0,402,88,1,0,0,0,403,
        405,7,5,0,0,404,406,7,6,0,0,405,404,1,0,0,0,405,406,1,0,0,0,406,
        407,1,0,0,0,407,408,3,85,42,0,408,90,1,0,0,0,409,412,7,7,0,0,410,
        412,3,79,39,0,411,409,1,0,0,0,411,410,1,0,0,0,412,413,1,0,0,0,413,
        411,1,0,0,0,413,414,1,0,0,0,414,92,1,0,0,0,415,417,7,8,0,0,416,415,
        1,0,0,0,417,418,1,0,0,0,418,416,1,0,0,0,418,419,1,0,0,0,419,420,
        1,0,0,0,420,421,6,46,0,0,421,94,1,0,0,0,15,0,353,355,363,376,383,
        386,389,396,398,401,405,411,413,418,1,6,0,0
    ]
class ASLIntrinsicLexer(Lexer):