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

Imports whose name contains "color" cause Syntax error #240

Closed
micycle1 opened this issue Aug 9, 2021 · 5 comments
Closed

Imports whose name contains "color" cause Syntax error #240

micycle1 opened this issue Aug 9, 2021 · 5 comments

Comments

@micycle1
Copy link

micycle1 commented Aug 9, 2021

Description

Imports whose name contains "color" cause a syntax error since Processing interprets these as the color datatype.

image

Your Environment

  • Processing version: 4.0 Beta 1
  • Operating System and OS version: Windows 10
@benfry
Copy link
Owner

benfry commented Aug 9, 2021

Hm, that's unfortunate, though I'm not sure it's a bug—does that work with int, float, or any other primitive types? color is what's considered a “reserved word” in the language.

(Edited to add: if it was working in 3.x, that was probably a bug in the preprocessor, unfortunately.)

@micycle1
Copy link
Author

It was working in 3.x.

image

image

@sampottinger
Copy link
Collaborator

I’ll look into this right away @micycle1. Thank you for reporting it.

@sampottinger
Copy link
Collaborator

Apologies @benfry and @micycle1 for not having seeing this during the alpha testing. Color is a little strange because, gramatically, it shouldn't be able to appear in a fully qualified name (or import) like int cannot. However, I would hate to have any incompatibility. @benfry, I'm suggesting a change to the grammar. Please see #246.

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants