Skip to content

Commit e3827c5

Browse files
authored
updated haxeparser and tokentree libs to support latest Haxe nightly … (#514)
* updated haxeparser and tokentree libs to support latest Haxe nightly syntax
1 parent 3f39ea7 commit e3827c5

File tree

9 files changed

+27
-15
lines changed

9 files changed

+27
-15
lines changed

CHANGELOG.md

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

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

5+
## version 2.8.2 (2022-09-14)
6+
7+
- Updated haxeparser and tokentree libs to support latest Haxe nightly syntax ([#514](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/514))
8+
59
## version 2.8.1 (2022-09-07)
610

711
- Added support for inline markup ([#513](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/513))

haxe_libraries/haxeparser.hxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#1ea2a8915956ac3af6f1a11c67e0e56261b75929" into haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929
1+
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#f0a7f07101c14dc32b0964dd52af8dcaa322e178" into haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178
22
-lib hxparse
3-
-cp ${HAXE_LIBCACHE}/haxeparser/3.3.0/github/1ea2a8915956ac3af6f1a11c67e0e56261b75929/src
4-
-D haxeparser=3.3.0
3+
-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/f0a7f07101c14dc32b0964dd52af8dcaa322e178/src
4+
-D haxeparser=4.3.0-rc.1

haxe_libraries/hxparse.hxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# @install: lix --silent download "gh://github.com/Simn/hxparse#93f67419852e96daa2b81901c43a77e878c8c2bc" into hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc
2-
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/93f67419852e96daa2b81901c43a77e878c8c2bc/src
3-
-D hxparse=4.0.1
1+
# @install: lix --silent download "gh://github.com/simn/hxparse#32e376f80c4b0e999e9f3229947d4dac2138382b" into hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b
2+
-cp ${HAXE_LIBCACHE}/hxparse/4.0.1/github/32e376f80c4b0e999e9f3229947d4dac2138382b/src
3+
-D hxparse=4.0.1

haxe_libraries/tokentree.hxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# @install: lix --silent download "haxelib:/tokentree#1.2.1" into tokentree/1.2.1/haxelib
2-
-cp ${HAXE_LIBCACHE}/tokentree/1.2.1/haxelib/src
3-
-D tokentree=1.2.1
1+
# @install: lix --silent download "haxelib:/tokentree#1.2.3" into tokentree/1.2.3/haxelib
2+
-cp ${HAXE_LIBCACHE}/tokentree/1.2.3/haxelib/src
3+
-D tokentree=1.2.3

haxelib.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"adireddy",
1919
"Gama11"
2020
],
21-
"releasenote": "added support for inline markup - see CHANGELOG",
22-
"version": "2.8.1",
21+
"releasenote": "updated haxeparser and tokentree libs to support latest Haxe nightly syntax - see CHANGELOG",
22+
"version": "2.8.2",
2323
"url": "https://github.com/HaxeCheckstyle/haxe-checkstyle",
2424
"dependencies": {}
2525
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@haxecheckstyle/haxe-checkstyle",
3-
"version": "2.8.1",
3+
"version": "2.8.2",
44
"description": "Automated code analysis ideal for projects that want to enforce a coding standard.",
55
"repository": {
66
"type": "git",

src/checkstyle/checks/imports/UnusedImportCheck.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class UnusedImportCheck extends Check {
127127
case Kwd(KwdPackage):
128128
case Semicolon:
129129
return moduleName.toString();
130-
case Binop(OpIn):
130+
case Kwd(KwdIn) | Binop(OpIn):
131131
if (token.parent.tok.match(Dot)) moduleName.add(token.toString());
132132
else moduleName.add(" in ");
133133
case Const(CIdent("as")):

src/checkstyle/checks/whitespace/OperatorWhitespaceCheck.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ class OperatorWhitespaceCheck extends WhitespaceCheckBase {
249249
return switch (token.tok) {
250250
case Binop(OpInterval): FoundSkipSubtree;
251251
case IntInterval(_): FoundSkipSubtree;
252+
case Spread:
253+
if (token.parent == null) return GoDeeper;
254+
switch (token.parent.tok) {
255+
case POpen:
256+
return GoDeeper;
257+
default:
258+
FoundSkipSubtree;
259+
}
252260
default: GoDeeper;
253261
}
254262
});

0 commit comments

Comments
 (0)