Skip to content

Commit

Permalink
updated haxeparser
Browse files Browse the repository at this point in the history
fixed enum abstract handling
  • Loading branch information
AlexHaxe committed Jul 5, 2023
1 parent 9f85e10 commit f742f2c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkstyle-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
haxe-version: ['4.3.0', 'nightly']
haxe-version: ['4.3.1', 'nightly']
env:
CC_TEST_REPORTER_ID: c4eda639526d39fbcab7ab9fc68c4046d4e597df56dbcb552b42d27b3580b758
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
4 changes: 2 additions & 2 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#7e98c9aef901b8e26541cf3f8a6e1da0385b237a" into haxeparser/4.3.0-rc.1/github/7e98c9aef901b8e26541cf3f8a6e1da0385b237a
# @install: lix --silent download "gh://github.com/HaxeCheckstyle/haxeparser#5f3d79c4561eea42aae43ee1b3d58e043358c03e" into haxeparser/4.3.0-rc.1/github/5f3d79c4561eea42aae43ee1b3d58e043358c03e
-lib hxparse
-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/7e98c9aef901b8e26541cf3f8a6e1da0385b237a/src
-cp ${HAXE_LIBCACHE}/haxeparser/4.3.0-rc.1/github/5f3d79c4561eea42aae43ee1b3d58e043358c03e/src
-D haxeparser=4.3.0-rc.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.9" into tokentree/1.2.9/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.9/haxelib/src
-D tokentree=1.2.9
# @install: lix --silent download "haxelib:/tokentree#1.2.10" into tokentree/1.2.10/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.10/haxelib/src
-D tokentree=1.2.10
2 changes: 1 addition & 1 deletion src/checkstyle/utils/ComplexTypeUtils.hx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ComplexTypeUtils {
walkCommonDefinition(d, pos, cb);
for (f in d.flags) {
switch (f) {
case AFromType(ct) | AToType(ct) | AIsType(ct):
case AbFrom(ct) | AbTo(ct) | AbOver(ct):
walkComplexType(ct, f.getName(), pos, cb);
default:
}
Expand Down
2 changes: 1 addition & 1 deletion src/checkstyle/utils/ExprUtils.hx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ExprUtils {
walkCommonDefinition(d, cb);
for (f in d.flags) {
switch (f) {
case AFromType(ct) | AToType(ct) | AIsType(ct):
case AbFrom(ct) | AbTo(ct) | AbOver(ct):
walkComplexType(ct, cb);
default:
}
Expand Down
7 changes: 7 additions & 0 deletions src/checkstyle/utils/FieldUtils.hx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ class FieldUtils {
case EAbstract(a):
var metaName = #if (haxeparser > "3.2.0") ":enum" #else ":kwdenum" #end;
var kind = a.meta.hasMeta(metaName) ? ENUM_ABSTRACT : ABSTRACT;
for (flag in a.flags) {
switch (flag) {
case AbEnum:
kind = ENUM_ABSTRACT;
default:
}
}
return {decl: decl, kind: kind};
case ETypedef(d):
return {decl: decl, kind: TYPEDEF};
Expand Down

0 comments on commit f742f2c

Please sign in to comment.