- if tokens[index].type != 'close_parenthese':
- raise Exception('Expected ")", found "{}" on line {}'.format(
- tokens[index].match,
- tokens[index].line,
- ))
- index += 1
+ while success and index < len(tokens):
+ # "function" is actually the full function call if the next parse attempt doesn't succeed
+ # We can't give this a better name without a bunch of checks, however.
+ function = FurFunctionCallExpression(
+ function=function,
+ arguments=arguments,
+ )
+
+ success, index, arguments = _parenthese_wrapped_parser(_comma_separated_expression_list_parser)(
+ index,
+ tokens,
+ )