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

TokenTreeBuilder crash with conditional else #238

Closed
Gama11 opened this issue Apr 11, 2016 · 0 comments · Fixed by #298
Closed

TokenTreeBuilder crash with conditional else #238

Gama11 opened this issue Apr 11, 2016 · 0 comments · Fixed by #298
Assignees

Comments

@Gama11
Copy link
Member

Gama11 commented Apr 11, 2016

class Foo
{
    function foo()
    {
        #if def
        if (true) {}
        else
        {
        #end

        trace("test");

        #if def
        }
        #end
    }
}
bad token Sharp(end) != BrClose
Stacktrace: 
Called from checkstyle.token.TokenStream::consumeTokenDef line 46
Called from checkstyle.token.TokenTreeBuilder::walkBlock line 736
Called from checkstyle.token.TokenTreeBuilder::walkIf line 850
Called from checkstyle.token.TokenTreeBuilder::walkKeyword line 651
Called from checkstyle.token.TokenTreeBuilder::walkIdentifier line 564
Called from checkstyle.token.TokenTreeBuilder::walkSharpExpr line 1261
Called from checkstyle.token.TokenTreeBuilder::walkSharpIf line 1175
Called from checkstyle.token.TokenTreeBuilder::walkSharp line 1154
Called from checkstyle.token.TokenTreeBuilder::walkStatement line 480
Called from checkstyle.token.TokenTreeBuilder::walkBlock line 734
Called from checkstyle.token.TokenTreeBuilder::walkFunction line 338
Called from checkstyle.token.TokenTreeBuilder::walkClass line 126
Called from checkstyle.token.TokenTreeBuilder::walkType line 49
Called from checkstyle.token.TokenTreeBuilder::walkFile line 38
Called from checkstyle.token.TokenTreeBuilder::buildTokenTree line 18
Called from checkstyle.Checker::getTokenTree line 53
Called from checkstyle.checks.whitespace.WhitespaceAfterCheck::checkTokens line 88
Called from checkstyle.checks.whitespace.WhitespaceAfterCheck::actualRun line 84
Called from checkstyle.checks.Check::run line 41
@Gama11 Gama11 added the bug label Apr 11, 2016
Gama11 added a commit to HaxeFlixel/flixel that referenced this issue Apr 16, 2016
- the import warnings only appear with checkstyle dev because of some fixed crashes
- workaround for crash in FlxGame#updateInput() (see HaxeCheckstyle/haxe-checkstyle#238)
- added TestSuite to excludes again
AlexHaxe added a commit to AlexHaxe/haxe-checkstyle that referenced this issue Oct 8, 2016
AlexHaxe added a commit that referenced this issue Oct 8, 2016
fixes #76, resolves #79, fixed #238 and resolved #252
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this issue Apr 18, 2018
- the import warnings only appear with checkstyle dev because of some fixed crashes
- workaround for crash in FlxGame#updateInput() (see HaxeCheckstyle/haxe-checkstyle#238)
- added TestSuite to excludes again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants