Skip to content

Commit

Permalink
updated haxeparser and tokentree libs to support latest Haxe nightly … (
Browse files Browse the repository at this point in the history
#514)

* updated haxeparser and tokentree libs to support latest Haxe nightly syntax
  • Loading branch information
AlexHaxe authored Sep 14, 2022
1 parent 3f39ea7 commit e3827c5
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (2.x.x)

## version 2.8.2 (2022-09-14)

- Updated haxeparser and tokentree libs to support latest Haxe nightly syntax ([#514](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/514))

## version 2.8.1 (2022-09-07)

- Added support for inline markup ([#513](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/513))
Expand Down
6 changes: 3 additions & 3 deletions haxe_libraries/haxeparser.hxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#1ea2a8915956ac3af6f1a11c67e0e56261b75929" into haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#f0a7f07101c14dc32b0964dd52af8dcaa322e178" into haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178
-lib hxparse
-cp ${HAXE_LIBCACHE}/haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929/src
-D haxeparser=3.3.0
-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178/src
-D haxeparser=4.3.0-rc.1
6 changes: 3 additions & 3 deletions haxe_libraries/hxparse.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @install: lix --silent download "gh://github.com/Simn/hxparse#93f67419852e96daa2b81901c43a77e878c8c2bc" into hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc/src
-D hxparse=4.0.1
# @install: lix --silent download "gh://github.com/simn/hxparse#32e376f80c4b0e999e9f3229947d4dac2138382b" into hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b/src
-D hxparse=4.0.1
6 changes: 3 additions & 3 deletions haxe_libraries/tokentree.hxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @install: lix --silent download "haxelib:/tokentree#1.2.1" into tokentree/1.2.1/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.1/haxelib/src
-D tokentree=1.2.1
# @install: lix --silent download "haxelib:/tokentree#1.2.3" into tokentree/1.2.3/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.3/haxelib/src
-D tokentree=1.2.3
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"adireddy",
"Gama11"
],
"releasenote": "added support for inline markup - see CHANGELOG",
"version": "2.8.1",
"releasenote": "updated haxeparser and tokentree libs to support latest Haxe nightly syntax - see CHANGELOG",
"version": "2.8.2",
"url": "https://github.com/HaxeCheckstyle/haxe-checkstyle",
"dependencies": {}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@haxecheckstyle/haxe-checkstyle",
"version": "2.8.1",
"version": "2.8.2",
"description": "Automated code analysis ideal for projects that want to enforce a coding standard.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/checkstyle/checks/imports/UnusedImportCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class UnusedImportCheck extends Check {
case Kwd(KwdPackage):
case Semicolon:
return moduleName.toString();
case Binop(OpIn):
case Kwd(KwdIn) | Binop(OpIn):
if (token.parent.tok.match(Dot)) moduleName.add(token.toString());
else moduleName.add(" in ");
case Const(CIdent("as")):
Expand Down
8 changes: 8 additions & 0 deletions src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ class OperatorWhitespaceCheck extends WhitespaceCheckBase {
return switch (token.tok) {
case Binop(OpInterval): FoundSkipSubtree;
case IntInterval(_): FoundSkipSubtree;
case Spread:
if (token.parent == null) return GoDeeper;
switch (token.parent.tok) {
case POpen:
return GoDeeper;
default:
FoundSkipSubtree;
}
default: GoDeeper;
}
});
Expand Down

0 comments on commit e3827c5

Please sign in to comment.