netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Added bracket highlighting for generic angle brackets

Open TylerDelRosario opened this issue 8 months ago • 1 comments

closes #5024

  • Added bracket highlighting for generic angle brackets.

  • Includes a couple of new unit tests.

The biggest hurdle is that bit wise shift operators get tokenized by the lexer. The simplest solution would be to take the input TokenHierarchy and split GTGT tokens into separate GT tokens.

But after diving into the lexer module, it seems that almost all token related classes are either immutable or contain package-private constructors. If there's a way that TokenHierarchy can be modified, I would genuinely like to learn how.

Otherwise, I've opted to add an algorithm that specifically handles angle brackets while managing the counter and offsets accordingly.

Thank you to matthiasblaesing for showing where the appropriate files are and the lexer token stream.


^Add meaningful description above

Click to collapse/expand PR instructions

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. [ ] Was this PR correctly labeled, did the right tests run? When did they run?
  2. [ ] Is this PR squashed?
  3. [ ] Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. [ ] Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

TylerDelRosario avatar May 11 '25 07:05 TylerDelRosario

Thank you for taking your time to build and review this. I genuinely appreciate the feedback. I'm going add these unit tests and give this another round to specifically address the comparison and bitwise error markers while making my code more readable. I'll also fix the formatting errors that you and essien pointed out.

TylerDelRosario avatar May 31 '25 01:05 TylerDelRosario