Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ParameterList struct #35

Closed
quephird opened this issue Mar 25, 2024 · 1 comment
Closed

Introduce ParameterList struct #35

quephird opened this issue Mar 25, 2024 · 1 comment

Comments

@quephird
Copy link
Owner

Before tackling #34, I should refactor the parser, resolver, and interpreter to use a new ParameterList struct, which not only contains the list of named parameters to a function, but it should also be the object to be consulted when checking the arity of that function. It will ultimately look something like this:

struct ParameterList {
    var normalParameters: [Token]
    var variadicParameter: Token?
}

... but also with an arity checking method. UserDefinedFunction will need to be updated as well.

@quephird
Copy link
Owner Author

quephird commented Apr 9, 2024

Addressed in #45

@quephird quephird closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant