c2nes / javalang

Pure Python Java parser and tools
MIT License
736 stars 161 forks source link

unary operators parsed but no has no corresponding entity or parameters in javalang #26

Closed sandeshc closed 8 years ago

sandeshc commented 8 years ago

On parsing the following test case with javalang it wasn't able to detect the unary (prefix) operator ++. The issue is prevalent for other unary operators as well, such as +, -, ++ (postfix), !

class Test
{
    Test()
    {
        x = ++y;
    }
}

Output on parsing above test file : issue_output The operator has no entry in the output ( test file is being parsed successfully ).

c2nes commented 8 years ago

Thanks @sandeshc. Turned out it was a simple naming mismatch between the parser and AST tree definition. Just pushed up a fix.

sandeshc commented 8 years ago

@c2nes Thanks for the quick fix. :)