Skip to content

Commit

Permalink
fixed empty switch cases withth comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Feb 7, 2024
1 parent fc8c149 commit 6f21943
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tokentree.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.2', 'nightly']
haxe-version: ['4.3.3', 'nightly']
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
Expand Down Expand Up @@ -58,5 +58,5 @@ jobs:
if: matrix.haxe-version != 'nightly'
run: npx neko checkstyle/run.n -s src -s test
- name: Upload results to codecov
if: success() && (matrix.haxe-version == '4.3.2')
if: success() && (matrix.haxe-version == '4.3.3')
run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ target/
.unittest/
dump/
haxe3/
check-style-report.json
check-style-report.xml
checkstyle-report.json
checkstyle-report.xml
coverage.json
lcov.info
display.hxml
codecov.json
flame.json
tokenmain*
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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

- fixed empty switch cases with comments

## version 1.2.10 (2023-05-21)

- fixed extends handling in interfaces
Expand Down
2 changes: 1 addition & 1 deletion makeReleaseZip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

npm install
npx lix download
npx lix use haxe 4.3.2
npx lix use haxe 4.3.3

haxe test.hxml

Expand Down
2 changes: 1 addition & 1 deletion src/tokentree/walk/WalkSwitch.hx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class WalkSwitch {
WalkBlock.walkBlock(stream, dblDot);
case Comment(_), CommentLine(_):
switch (stream.peekNonCommentToken()) {
case Kwd(KwdCase), Kwd(KwdDefault): return;
case Kwd(KwdCase) | Kwd(KwdDefault) if (stream.getStreamIndex() > dblDot.index + 1): return;
default:
}
WalkComment.walkComment(stream, dblDot);
Expand Down

0 comments on commit 6f21943

Please sign in to comment.