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

Implement fixes from some repos that aren't being tracked yet #44

Merged
merged 5 commits into from
Nov 16, 2021

Conversation

alex-pinkus
Copy link
Owner

I want to add a big new repository into top-repos, but we're failing
a bit more than I'd like (and there's some optimization work to do).
Still, there's no reason not to land the fixes while improvements
continue.

  • Allow implicitly unwrapped types in a few more places
  • Fix unicode escape handling in strings
  • Add a few more special literals
  • Add ! as a possible character in an init
  • Add the dynamic modifier for class members
  • Allow subscript declarations in protocols

This had been copy-pasted from the kotlin grammar but the two aren't
actually the same. Swift allows shorter escape sequences but requires
them to be enclosed in braces.

Fixes #42
The grammar hardcodes a few directive-looking things that we don't
handle today, namely playground literals and key path strings. Adding
those in explicitly for now, but this is worth reevaluating in the
future; it may be better to go generic and let the real language be more
restrictive.

Fixes #43
Intentionally not encoding the requirement that dynamic must always be
accompanied by @objc, because there isn't really a reason to.
Luckily, these are already pretty loosely defined so that the block is
optional, so we can still just have a single definition in the grammar
for both.
@alex-pinkus alex-pinkus force-pushed the fixes-from-not-yet-tracked-repos branch from 98900c2 to 9402a4f Compare November 16, 2021 06:37
@alex-pinkus alex-pinkus merged commit 9a56dd4 into main Nov 16, 2021
@alex-pinkus alex-pinkus deleted the fixes-from-not-yet-tracked-repos branch November 16, 2021 06:40
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