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

parsing error: (Token(u'::', xxx, yyy), [], [Token(u'B', zzz, bbb)]) #148

Open
TomerJLevy opened this issue Sep 20, 2019 · 1 comment
Open

Comments

@TomerJLevy
Copy link
Contributor

Hi,

If I put the namespace as a Macro instead of 'using' or any other C++ way, it compiles but 'cppclean' fails to parse the tokens.

Here is a way to reproduce it:

#define NS_B(b) A::b

namespace A{
  namespace B{
    class C;
  }
}

class C {
  NS_B(B)::C* c;
};

In my opinion 'cppclean' should handle that situation. Just as C++ persist to backward compatibility to C language.

@abrock
Copy link

abrock commented Jan 30, 2020

I have a large project (I can not share it) and I found a file where cppclean stops with an exception:

../cppclean/cppclean cppclean-error.cpp
cppclean-error.cpp: parsing error: unexpected token: Token(u'return', 128, 134)

I deleted as much code as possible until the error disappeared, this is the result:
cppclean.zip

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

No branches or pull requests

3 participants