Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

namespace marker "::" breaks bracket highlights when after "operator" with a return stament containing more than one token #344

Open
SoAsEr opened this issue Apr 9, 2020 · 2 comments

Comments

@SoAsEr
Copy link

SoAsEr commented Apr 9, 2020

if I type

class test{
  operator namespace::type() const{
    return a+b;
  }
};

then the bracket after the return statement is parsed as belonging to test{ and "return" is not highlighted
if I only have one token in the return statement, like this:

class test{
  operator namespace::type() const{
    return a;
  }
};

then the close bracket is parsed correctly, but "return" is still not highlighted
Removing the namespace:

class test{
  operator type() const{
    return a+b;
  }
};

fixes both issues

The incorrect parsing of this bracket causes the rest of the file to be incorrectly parsed as well.

This might be related to #260.

@SoAsEr SoAsEr changed the title namespace marker "::" breaks bracket highlights when after "operator" with a return type with more than one token namespace marker "::" breaks bracket highlights when after "operator" with a return stament containing more than one token Apr 9, 2020
@lkashef
Copy link

lkashef commented Apr 10, 2020

Hey @SoAsEr, thanks for the report!

Please use the template to help us address your report more efficiently.

Also it would be better to open two different issues if you think that the two problems you reported are not related.

Could you also confirm if you are using tree-sitter or TextMate?

@SoAsEr
Copy link
Author

SoAsEr commented Apr 11, 2020

It is the tree sitter parser that is the issue. When I disable tree sitter in settings, the issue goes away.

Also, I would be surprised if the issues were seperate, they look very connected to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants