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

Parser #136

Merged
merged 54 commits into from
Sep 12, 2023
Merged

Parser #136

merged 54 commits into from
Sep 12, 2023

Conversation

susan-garry
Copy link
Contributor

Integrate a bunch of new parser features! Things that didn't parse before but now do include:

  • 2-tuples
  • Record initialization and field access (e.g., ('RecordType { f1 = v }).field1and{r1 with f1 = v2}`)
  • Control flow (while, for, if/elif/else)
  • Object declaration (Strand())
  • Function and method calls (fun();, strand.push('A');)
  • Set types (Set<t>)
  • emit-to statements
  • Function definition
  • parset and graph declarations
  • import statements

Other changes:

  • Add a testing framework using runt
  • Types go after identifiers (int i -> i: int)
  • Add tests for depth.pollen and crush.pollen (I chose .pollen as the pollen file extension because .pol is apparently already a thing, but if no one here has heard of it then it's probably safe to make .pol the cannonical file extension).

@susan-garry susan-garry merged commit a96d301 into main Sep 12, 2023
1 check passed
@susan-garry susan-garry deleted the parser branch September 12, 2023 20:15
sampsyo added a commit that referenced this pull request Sep 24, 2023
It looks like #136 renamed the `test` directory to `tests`. In the
process, it seems to have deleted these files, which was then causing
(e.g.) `make og` to fail.
This was referenced Oct 7, 2023
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.

3 participants