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

Parse command return types #46

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Parse command return types #46

wants to merge 9 commits into from

Conversation

ysthakur
Copy link
Member

This PR parses return types for commands and records these in the typechecker, although it doesn't check that the actual result type matches the expected type.

Regarding parsing, I chose to add a AstNode::InOutTypes(Vec<NodeId>) variant to hold the list of input-output type pairs. Making that list its own node means we can highlight the entire span [ foo -> bar ] in error messages, including the brackets. But if that's not something we need, I can get rid of the InOutTypes variant and directly store a Vec<NodeId> inside each AstNode::Def. That'd be simpler.

@ysthakur ysthakur marked this pull request as draft January 13, 2025 02:45
@ysthakur ysthakur marked this pull request as ready for review January 13, 2025 02:49
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