Skip to content

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

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

Closed
processing-bot opened this issue Aug 9, 2021 · 5 comments
Closed

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

processing-bot opened this issue Aug 9, 2021 · 5 comments
Labels
has attachment Attachment was not transfered from GitLab

Comments

@processing-bot
Copy link
Collaborator

In GitLab by @micycle1 on Aug 9, 2021, 15:10

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
@processing-bot
Copy link
Collaborator Author

Created by: benfry

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.)

@processing-bot
Copy link
Collaborator Author

In GitLab by @micycle1 on Aug 11, 2021, 12:55

It was working in 3.x.

image

image

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

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

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

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.

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

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 Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has attachment Attachment was not transfered from GitLab
Projects
None yet
Development

No branches or pull requests

1 participant