Skip to content

Feat: Use assign in functions and anonymous functions#473

Merged
JSAbrahams merged 15 commits intodevelopfrom
feat-simplify-grammar
Jun 25, 2025
Merged

Feat: Use assign in functions and anonymous functions#473
JSAbrahams merged 15 commits intodevelopfrom
feat-simplify-grammar

Conversation

@JSAbrahams
Copy link
Copy Markdown
Owner

Relevant issues

None

Summary

Functions are definitions, so we assign to them.
Similarly, we assign with lambda.

Playing around a bit to see if the grammar still looks nice, but I think that conceptually this makes more sense.

Added Tests

  • Rewrite all necessary tests resources to conform to new grammar.

@JSAbrahams JSAbrahams added this to the v0.3.7 | Type alias milestone Jun 23, 2025
@JSAbrahams JSAbrahams self-assigned this Jun 23, 2025
@JSAbrahams JSAbrahams added enhancement: parse New feature in the parse module language design Issues with regards to the design of the actual langauge labels Jun 23, 2025
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from 4f33196 to 361b959 Compare June 23, 2025 10:05
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch 3 times, most recently from 9af21ef to 1fc9894 Compare June 23, 2025 10:26
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from 1fc9894 to 3d907af Compare June 23, 2025 14:25
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from 3d907af to a6a7fd9 Compare June 23, 2025 20:15
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from a6a7fd9 to c171001 Compare June 23, 2025 20:21
- Still need to rework the handle, re-using the node
  gives issues in check and desugar stages. Instead,
  better to make call more powerfull and make that
  store cases
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch 3 times, most recently from 5fedcc4 to ce822ed Compare June 25, 2025 07:41
Joel Abrahams added 3 commits June 25, 2025 10:29
Note that the Handle AST construct still exists.
We simply remove the keyword, and construct a handle Node if we
see an expression or statement followed by a newline and indent.
This signifies we are going to parse match cases of a handle.

Still have to:

- Make sure type checker takes into account that we added a '!' char
  a function call.
  This signifies we don't exhaustively catch all exceptions but that
  some are thrown up.
  This also means we need to make sure the parser (1) catches this
  char and (2) passes this information to the type checker
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from ce822ed to 453f1a1 Compare June 25, 2025 08:31
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch 2 times, most recently from 67e3194 to b36fb7a Compare June 25, 2025 09:39
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from b36fb7a to 9a5346a Compare June 25, 2025 09:45
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from 9a5346a to cddc126 Compare June 25, 2025 09:56
May be a bit confusing to people coming from other
languages, but still, fun to play with syntax
@JSAbrahams JSAbrahams force-pushed the feat-simplify-grammar branch from 8c4cc98 to 5ad170d Compare June 25, 2025 13:24
@JSAbrahams JSAbrahams marked this pull request as ready for review June 25, 2025 19:50
@JSAbrahams JSAbrahams merged commit 0c35d02 into develop Jun 25, 2025
4 checks passed
@JSAbrahams JSAbrahams deleted the feat-simplify-grammar branch June 25, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: parse New feature in the parse module language design Issues with regards to the design of the actual langauge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant