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

Substantial surface language redesign #174

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

fmease
Copy link
Owner

@fmease fmease commented Apr 28, 2023

  • complete the trait lowering step, specifically the synthesis of the accessors
  • represent record literals in Lo-AST & HIR and lower & resolve record literals
  • lower trait literals to record literals (& add FIXME for rejecting attempts to construct records through trait literals)
  • lower given-declarations to function decls + @context (not part of the surface lang) + record literal
  • get rid of parse_associated_declaration, just parse_declaration inside of data decls & reject non-functions in the lowerer (use-decls: todo, rest: invalid)
  • write a bunch of new UI tests and finish updating the older ones
  • support the pattern let _ (i.e. LocalBinder::Discarded) in the lowerer & the resolver (currently: crash in the lowerer)
  • fix attribute validation which got trashed in this patch
    • in some shape or form we want to support the newly added syntactic constructs (wildcards, record & trait decls, etc.)
    • the question is how fine-grained, leading to the next point
    • bitfields are not a great solution for attribute targets and it became more and more obvious
    • they are not versatile, flexible or extensible enough cmp. to normal Rust functions
    • we always wanted to disallow @public on the root module but couldn't (in this system which I tried to largely stick to)
    • special care needs to be taken for associated decls (constructors, record & trait fields), esp. wrt. @public
    • the current system is awkward
  • define @given and reject it in the lowerer as unimplemented
  • (not sure if blocking, otherwise as FIXME) lower attributes on record & trait fields to … parameter attributes
  • fix the most offensive @Temporarys & @Tasks intro'd in this PR

@fmease fmease force-pushed the substantial-surface-language-redesign branch from 8994bbe to ebaafb9 Compare April 28, 2023 11:23
@fmease fmease force-pushed the substantial-surface-language-redesign branch 2 times, most recently from 3ef4873 to c183699 Compare May 7, 2023 15:27
@fmease fmease marked this pull request as draft May 7, 2023 15:36
@fmease fmease force-pushed the substantial-surface-language-redesign branch from c183699 to 3e18045 Compare May 7, 2023 16:56
@fmease
Copy link
Owner Author

fmease commented May 15, 2023

Non-blocking TODOs (non-exhaustive):

  • start writing up some sort of reference / specification since the semantics are a tad more complicated & it starts getting harder to keep everything in my head esp. when stuff changes so drastically so quickly
  • perform similar refactorings to the rest of the code base
    • inline error module for -> Diagnostic functions
    • (maybe) split into smaller fns (only where sensible ofc)
  • proper documenter support for record & trait decls
    • reconstruct them to their pre-lowered form
    • render docs & other attrs on record & trait fields
  • documenter support for param docs (which are a natural consequence of supporting field attrs via param attrs)
  • deny shadowing for ast::Parameters & add tests

@fmease fmease self-assigned this May 15, 2023
@fmease fmease force-pushed the substantial-surface-language-redesign branch 2 times, most recently from d2739d1 to 8b5ddc2 Compare May 25, 2023 15:24
compiler/parser/src/common.rs Outdated Show resolved Hide resolved
@fmease fmease force-pushed the substantial-surface-language-redesign branch from 8b5ddc2 to 9252c91 Compare July 13, 2023 13:00
@fmease fmease mentioned this pull request Jul 27, 2023
@fmease fmease force-pushed the substantial-surface-language-redesign branch 2 times, most recently from 6466f66 to 6e7336e Compare July 28, 2023 16:16
@fmease fmease force-pushed the substantial-surface-language-redesign branch from 6e7336e to c416a25 Compare August 1, 2023 18:03
@fmease
Copy link
Owner Author

fmease commented Aug 1, 2023

Going to postpone the unticked tasks from the description.

@fmease fmease marked this pull request as ready for review August 1, 2023 18:09
@fmease fmease merged commit fa19c89 into master Aug 1, 2023
7 checks passed
@fmease fmease deleted the substantial-surface-language-redesign branch August 1, 2023 18:10
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