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

Start working on commands #4

Merged
merged 14 commits into from
Jun 29, 2024
Merged

Start working on commands #4

merged 14 commits into from
Jun 29, 2024

Conversation

kubouch
Copy link
Collaborator

@kubouch kubouch commented Jun 14, 2024

This PR adds basic parsing, name binding and typechecking of def and signature parameters.

Closures and commands share the same parameter parsing code. Hopefully, we can grow it this way to enable more comprehensive typing of closures (e.g., input/output types).

Got sidetracked by improving the typechecker:

  • complex types like list<list<int>> are supported in command signatures
  • list type must have only one type param (list<int, string> and list<> are not allowed)
    • this is enforced at the typechecker, but we might want to push it all the way to the parser

It's not possible to call the defined commands yet, that will be a next PR.

@kubouch kubouch marked this pull request as ready for review June 29, 2024 18:12
@kubouch kubouch merged commit eba17ca into nushell:main Jun 29, 2024
4 checks passed
@kubouch kubouch deleted the def branch June 29, 2024 18:12
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

Successfully merging this pull request may close these issues.

1 participant