C++ lexer misparses after operator==()

Create issue
Issue #1104 duplicate
andy_pearce created an issue

When run through the C++ lexer, the following snippet classifies instanceA as class "n" but instanceB as class "nf". Empirically it seems it's the preceding operator definition which is confusing things, but I'm not sure why - it seems to be syntactically valid to me. Certainly it compiles as part of a larger snippet.

bool operator==(const MyClass& lhs, const MyClass& rhs)
{
    return true;
}

int function()
{
    AnotherClass instanceA(1);
    AnotherClass instanceB(2);

    return 0;
}

Comments (1)

  1. Log in to comment