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

fix: print comment before first binary operator without failing #688

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

jtkiesel
Copy link
Contributor

What changed with this PR:

Binary expressions with comments before the first operator no longer fail to print.

Example

Input

class Example {

  void example() {
    0 //
    + 1;
  }
}

Output

class Example {

  void example() {
    0 + //
    1;
  }
}

Relative issues or prs:

Closes #685

@jtkiesel jtkiesel force-pushed the fix/binary-expression-comments branch from b67ae16 to 4fbf48c Compare October 11, 2024 04:43
@jtkiesel jtkiesel merged commit 0e4370e into main Oct 11, 2024
11 checks passed
@jtkiesel jtkiesel deleted the fix/binary-expression-comments branch October 11, 2024 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read properties of undefined (reading 'startLine')
1 participant