Skip to content

Commit 3ac3d78

Browse files
authored
fixed BkOpen childs (#398)
* fixed BkOpen childs
1 parent c7f1f49 commit 3ac3d78

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGES.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
- Fixed handling of default setters/getters in indentation check [#391](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/391)
44
- Fixed token tree structure for Sharp(If) inside Kwd(KwdCase) [#394](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/394)
5-
- Fixed comments in function parameters [#395](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/394)
6-
- 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))
5+
- Fixed comments in function parameters [#395](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/395)
6+
- 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))
7+
- Fixed BkOpen childs in token tree parser [#398](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/398)
8+
- Fixed bad offset crash with C++ build on7 Windows 10 [#398](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/398)
79
- Added unittests for ParserQueue and CheckerPool [#393](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/393)
810
- Improved wrapped code detection [#392](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/392)
911

src/checkstyle/Checker.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Checker {
6060
}
6161
left = true;
6262
}
63-
if (left) linesIdx.push({l:last, r:code.length - 1});
63+
if (left) linesIdx.push({l:last, r:code.length});
6464
}
6565

6666
public function getLinePos(off:Int):LinePos {

src/checkstyle/token/walk/WalkTypeNameDef.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ class WalkTypeNameDef {
77
WalkTypedefBody.walkTypedefBody(stream, parent);
88
return parent.getFirstChild();
99
}
10+
if (stream.is(BkOpen)) {
11+
WalkArrayAccess.walkArrayAccess(stream, parent);
12+
return parent.getFirstChild();
13+
}
1014
if (stream.is(Question)) {
1115
var questTok:TokenTree = stream.consumeTokenDef(Question);
1216
parent.addChild(questTok);

0 commit comments

Comments
 (0)