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

Add match logic to AST and Nock. #7

Closed
wants to merge 34 commits into from

Conversation

sigilante
Copy link
Contributor

No description provided.

hoon/lib/jock.hoon Outdated Show resolved Hide resolved
@sigilante
Copy link
Contributor Author

Right now it's fairly aggressive in providing syntax errors, but this clutters the Hoon.

@sigilante
Copy link
Contributor Author

sigilante commented Nov 13, 2024

@tacryt-socryp please look at +hunt, ll. 1325–1359 in /hoon/lib/jock.hoon.

There's a mint-vain because I'm not sure what it thinks the head of jype can be yet, but I think the recursive Nock for the cell and atom case should work to detect now.

(just default (cell) and atom now, others incomplete

@sigilante
Copy link
Contributor Author

sigilante commented Nov 14, 2024

Current status:

  • block comments necessary for testing (yakshaving)
  • else keyword fixed (yakshaving)
  • split match into match type and match case switches
  • in media res on match AST return logic
  • in media res on jype match logic (fish-loop bug, may take a while)

@sigilante
Copy link
Contributor Author

The builder and compiler steps work, but have not been thoroughly tested for correctness yet. I want to get some test cases in here before merging back into master.

The build check fails because it can't find out.jam; I suppose I should supply that to the repo.

@sigilante
Copy link
Contributor Author

OK, next need to very carefully check AST and generated Nock. Once I'm satisfied with that, we can cut a 0.1 release of Jock.

@sigilante
Copy link
Contributor Author

#11 enables testing on this branch.

@sigilante sigilante marked this pull request as ready for review November 20, 2024 18:45
@sigilante
Copy link
Contributor Author

Nock matching appears to be correct for atoms.

Matching on more complex types (paths, in particular) requires thinking more about the type system and will be a separate PR.

@sigilante sigilante mentioned this pull request Nov 20, 2024
15 tasks
@sigilante sigilante marked this pull request as draft November 25, 2024 17:43
@sigilante sigilante marked this pull request as ready for review November 25, 2024 17:44
@sigilante
Copy link
Contributor Author

Jam conflicts are hopeless even in rebase for some reason. Going to restart a fresh PR.

@sigilante sigilante closed this Dec 3, 2024
@sigilante sigilante deleted the sigilante/match branch December 3, 2024 16:11
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.

2 participants