This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Function call + array accessor + new operator introduces extra meta.function-call.java scopes #180
Comments
Can you include the language-java version that you are testing against? |
This is a weird one. I will have a look. |
sadikovi
pushed a commit
that referenced
this issue
Nov 28, 2019
…ttern ### Description of the Change * Dot should also end 'anonymous-classes-and-new', in order to propery highlight method call of temporary variable created by 'new'. * Question mark should also end 'anonymous-classes-and-new', in order to proper break out circumstances like `new Random() ? true : false`; * Right square brace should also end 'anonymous-classes-and-new', for circumstances like `[new Random()]`. * Xor should also end `anonymous-classes-and-new`, for circumstances like `new Integer(1) ^ new Integer(2)`. ### Alternate Designs ~~Non was considered.~~ Having to enumerate these much punctuations made me think of proposing a general and simple regex to end new expression. But soon I found out that I couldn't find a way to tell when `)` or `]` is met, whether there will be a `{}` block next to it. ### Benefits * The meaning of dot method call by variable and new-variable is consistent. * Every punctuation that could end a new expression is covered. ### Possible Drawbacks No obvious drawback. ### Applicable Issues Fix #213 -> dot Fix #179 -> question mark Fix #180 -> right square Fix #192 -> xor
Merged
sadikovi
added a commit
that referenced
this issue
Nov 28, 2019
### Requirements * Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. * All new code requires tests to ensure against regressions ### Description of the Change Refactors and moves the test case for #180 into a separate test. ### Alternate Designs N/A ### Benefits N/A ### Possible Drawbacks N/A ### Applicable Issues Relates to #180
12 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Expected behavior: [What you expect to happen]
As you can see, although the highlight is still correct, there are more
meta.function-call.java
than we need.The text was updated successfully, but these errors were encountered: