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

fixed BkOpen childs #398

Merged
merged 2 commits into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

- Fixed handling of default setters/getters in indentation check [#391](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/391)
- Fixed token tree structure for Sharp(If) inside Kwd(KwdCase) [#394](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/394)
- Fixed comments in function parameters [#395](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/394)
- Fixed parser errors when handling block and object declarations, fixes [#366](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/396) ([#397](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/394))
- Fixed comments in function parameters [#395](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/395)
- Fixed parser errors when handling block and object declarations, fixes [#396](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/396) ([#397](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/397))
- Fixed BkOpen childs in token tree parser [#398](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/398)
- Fixed bad offset crash with C++ build on7 Windows 10 [#398](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/398)
- Added unittests for ParserQueue and CheckerPool [#393](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/393)
- Improved wrapped code detection [#392](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/392)

Expand Down
2 changes: 1 addition & 1 deletion src/checkstyle/Checker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Checker {
}
left = true;
}
if (left) linesIdx.push({l:last, r:code.length - 1});
if (left) linesIdx.push({l:last, r:code.length});
}

public function getLinePos(off:Int):LinePos {
Expand Down
4 changes: 4 additions & 0 deletions src/checkstyle/token/walk/WalkTypeNameDef.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class WalkTypeNameDef {
WalkTypedefBody.walkTypedefBody(stream, parent);
return parent.getFirstChild();
}
if (stream.is(BkOpen)) {
WalkArrayAccess.walkArrayAccess(stream, parent);
return parent.getFirstChild();
}
if (stream.is(Question)) {
var questTok:TokenTree = stream.consumeTokenDef(Question);
parent.addChild(questTok);
Expand Down