Skip to content

Commit

Permalink
fixed parse error when trying to format conditional arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Sep 17, 2024
1 parent c6a69b2 commit b0b1b5a
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
build:
strategy:
matrix:
haxe-version: ['4.3.4', 'nightly']
platform: [ubuntu-latest, macos-latest, windows-latest]
haxe-version: ['4.3.6', 'nightly']
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set Git Auto CRLF to false on Windows
Expand Down
4 changes: 2 additions & 2 deletions .haxerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "4.3.4",
"version": "4.3.6",
"resolveLibs": "scoped"
}
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

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

## version 1.16.1 (2024-09-18)

- Refactored unittests to work with utest library ([#679](https://github.com/HaxeCheckstyle/haxe-formatter/issues/679))
- Removed munit library ([#679](https://github.com/HaxeCheckstyle/haxe-formatter/issues/679))
- Fixed parse error when trying to format conditional arrow function

## version 1.16.0 (2024-02-10)

Expand Down
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.13" into tokentree/1.2.13/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.13/haxelib/src
-D tokentree=1.2.13
# @install: lix --silent download "haxelib:/tokentree#1.2.14" into tokentree/1.2.14/haxelib
-cp ${HAXE_LIBCACHE}/tokentree/1.2.14/haxelib/src
-D tokentree=1.2.14
2 changes: 1 addition & 1 deletion haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"style"
],
"description": "A code formatter for Haxe",
"version": "1.16.0",
"version": "1.16.1",
"releasenote": "Added wrapping.mapWrap; fixed some indentation issues - see CHANGELOG for details.",
"contributors": [
"AlexHaxe",
Expand Down
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-formatter",
"version": "1.16.0",
"version": "1.16.1",
"description": "A code formatter for Haxe",
"repository": {
"type": "git",
Expand Down
26 changes: 26 additions & 0 deletions test/testcases/whitespace/mark_arrow_npe_with_conditionals.hxtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{}

---

function prepareToSong()
{
#if (target.threaded)
Thread.create(() -> {
#end
completedThread();
#if (target.threaded)
});
#end
}

---

function prepareToSong() {
#if (target.threaded)
Thread.create(() -> {
#end
completedThread();
#if (target.threaded)
});
#end
}

0 comments on commit b0b1b5a

Please sign in to comment.