diff --git a/CHANGELOG.md b/CHANGELOG.md index 42900d1..371fe83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,14 @@ ## dev branch / next version (1.x.x) +## version 1.0.27 (2020-04-18) + +- Fixed null pointer exception when pasrsing `private final class`, fixes [#183](https://github.com/HaxeCheckstyle/tokentree/issues/183) ([#184](https://github.com/HaxeCheckstyle/tokentree/issues/184)) + ## version 1.0.26 (2020-04-12) -- Fixed `Binop(OpOr)` position for non `case` places -- Fixed doc comments and metadata +- Fixed `Binop(OpOr)` position for non `case` places ([#182](https://github.com/HaxeCheckstyle/tokentree/issues/182)) +- Fixed doc comments and metadata ([#182](https://github.com/HaxeCheckstyle/tokentree/issues/182)) ## version 1.0.25 (2020-04-11) @@ -253,4 +257,4 @@ ## version 1.0.0 (2018-06-09) -- initial move to separate repository \ No newline at end of file +- initial move to separate repository diff --git a/haxelib.json b/haxelib.json index 2a697a6..8c0f3dd 100644 --- a/haxelib.json +++ b/haxelib.json @@ -7,8 +7,8 @@ "contributors": [ "AlexHaxe" ], - "releasenote": "fixed position Binop(OpOr) tokens and metadata with doc comments - see CHANGELOG for details", - "version": "1.0.26", + "releasenote": "fixed null pointer for `private final class` - see CHANGELOG for details", + "version": "1.0.27", "url": "https://github.com/HaxeCheckstyle/tokentree", "dependencies": {} } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3fd6eb1..1652528 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tokentree", - "version": "1.0.26", + "version": "1.0.27", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c653615..5ce8dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tokentree", - "version": "1.0.26", + "version": "1.0.27", "description": "TokenTree library used by haxe-checkstyle, haxe-formatter and haxe-languageserver", "repository": { "type": "git", diff --git a/src/tokentree/walk/WalkFinal.hx b/src/tokentree/walk/WalkFinal.hx index 9b1286a..9810748 100644 --- a/src/tokentree/walk/WalkFinal.hx +++ b/src/tokentree/walk/WalkFinal.hx @@ -24,6 +24,8 @@ class WalkFinal { stream.consumeToTempStore(); case Kwd(KwdFunction): return; + case Kwd(KwdClass): + return; default: } } diff --git a/test/tokentree/TokenTreeBuilderParsingTest.hx b/test/tokentree/TokenTreeBuilderParsingTest.hx index 0734d06..98296a2 100644 --- a/test/tokentree/TokenTreeBuilderParsingTest.hx +++ b/test/tokentree/TokenTreeBuilderParsingTest.hx @@ -113,6 +113,7 @@ class TokenTreeBuilderParsingTest { assertCodeParses(MODULE_LEVEL_STATIC); assertCodeParses(SWITCH_INDENTATION); assertCodeParses(METADATA_DOC_COMMENT); + assertCodeParses(PRIVATE_FINAL_CLASS); } public function assertCodeParses(code:String, ?pos:PosInfos) { @@ -1555,4 +1556,10 @@ import #if haxe4 js.lib.Promise #else js.Promise #end as JsPromise; */ extern class Bitmap extends DisplayObject {} "; + + var PRIVATE_FINAL_CLASS = " + private final class Test { + public function new() {} + } + "; } \ No newline at end of file