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

Highlighting of primitive types #128

Open
damon-kwok opened this issue Jun 24, 2020 · 1 comment
Open

Highlighting of primitive types #128

damon-kwok opened this issue Jun 24, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@damon-kwok
Copy link
Collaborator

damon-kwok commented Jun 24, 2020

Screenshot from 2020-06-24 17-35-49
The last two Nones should be recognized as constants rather than types

Screenshot from 2020-06-24 17-43-16
None in the return value should be recognized as a type

@damon-kwok damon-kwok added the help wanted Extra attention is needed label Jun 24, 2020
@jemc
Copy link
Member

jemc commented Jun 30, 2020

Discussed this briefly in today's sync call.

Personally, to me it is not clear that these should be considered different syntax highlighting cases, especially given the "create sugar" that Pony has - any time you mention a type where a value is expected, it is understood to be MyType.create() - including the cases you mentioned above None.create().

So in that context, I wouldn't really consider these to be "constants" in the syntax highlighting sense - they are simply types in every case. So you may be able to sidestep the potential parsing confusion entirely if you're willing to give up on these being separately highlighted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants