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

Tweak Mode broken by // comment at end of code #6168

Open
tobyhoward opened this issue Mar 15, 2021 · 3 comments
Open

Tweak Mode broken by // comment at end of code #6168

tobyhoward opened this issue Mar 15, 2021 · 3 comments
Labels
help wanted We have very little time and would like some help tweak

Comments

@tobyhoward
Copy link

Running a sketch in Tweak mode throws 'expecting "class", found TweakModeServer ' if the code ends with a // -style comment. A /* */ -style comment does not cause the issue. This issue appears only to be with a // comment at the end of the code.

void setup() {
  size(512, 512);
}

void draw() {
  strokeWeight(20);
} 

// this comment throws 'expecting "class", found TweakModeServer'

Environment: Processing 3.5.4 on macOS 10.15.7.

@SanjaySinghRajpoot
Copy link

ok got it, May I work on this issue.

@benfry benfry added help wanted We have very little time and would like some help tweak labels Jun 15, 2021
@abhi267266
Copy link

By adding an extra blank line after the last line of code, or by using a /* */-style comment instead of a //-style comment, you should be able to use Tweak Mode without encountering this error.

@abhi267266
Copy link

One possible solution to the Tweak Mode error you mentioned earlier would be to modify the Tweak class file to handle //-style comments at the end of the sketch. Specifically, you would need to modify the code injection process to ensure that it is not affected by these comments. if you can help me find the class I will be happy to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We have very little time and would like some help tweak
Projects
None yet
Development

No branches or pull requests

4 participants