Skip to content

Implement a more complete parameter list grammar #8

@arnsholt

Description

@arnsholt

The reference grammar is kind of tangled in this particular area, but I think the actual grammar goes something like this:

parameter_list: <positionals>? <positional_slurpy>? <nameds>? <named_slurpy>?

Where positionals is further constrained to not allow arguments without defaults once an argument with a default has been seen, and a positional slurpy can be either an identifier prefixed by * or just a literal star (signifying the end of the positional list without a slurpy).

There may be some further shenanigans required to be able to pass positionals by name and such, but this should at least get us a lot closer than we currently are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions