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

Missing support for playground literals #43

Closed
alex-pinkus opened this issue Nov 16, 2021 · 0 comments
Closed

Missing support for playground literals #43

alex-pinkus opened this issue Nov 16, 2021 · 0 comments
Labels
missing-language-feature A Swift language feature is not supported by the grammar

Comments

@alex-pinkus
Copy link
Owner

See "playground literals" here: https://docs.swift.org/swift-book/ReferenceManual/Expressions.html#grammar_literal-expression

Those can be things like #imageLiteral(resourceName: "foo") or #colorLiteral(red: 0 , green: 0 , blue: 0 , alpha: 0). If hard-coding this stuff is good enough for the official grammar, I suppose it can be good enough for us?

alex-pinkus added a commit that referenced this issue Nov 16, 2021
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
@alex-pinkus alex-pinkus added the missing-language-feature A Swift language feature is not supported by the grammar label Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-language-feature A Swift language feature is not supported by the grammar
Projects
None yet
Development

No branches or pull requests

1 participant