AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

[BUG] For loop can cause syntax highlighting not to work properly in some cases #78

Closed saltire closed 4 years ago

saltire commented 4 years ago

Sometimes a for loop can disrupt the syntax highlighting after it. I've narrowed it down to when there is an equals sign in the third clause and there's at least one statement inside the braces, though there may be other cases.

void setup() {
  for (int x = 1; x < 10; x += 2) {
    println(x);
  }
  println("done");
}

The second println call should be highlighted normally but it's not.

Screen Shot 2019-11-01 at 2 10 46 PM Screen Shot 2019-11-01 at 2 09 51 PM Screen Shot 2019-11-01 at 2 10 20 PM