Skip to content

Commit

Permalink
fixed conditionals using dot ident without parens, fixes #480 (#481)
Browse files Browse the repository at this point in the history
* fixed conditionals using dot ident without parens, fixes #480
  • Loading branch information
AlexHaxe authored May 30, 2019
1 parent 82d6e63 commit e1d2977
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ install:
- haxelib git tokentree https://github.com/HaxeCheckstyle/tokentree --never
- haxelib git hxargs https://github.com/Simn/hxargs --never
- haxelib git hxnodejs https://github.com/HaxeFoundation/hxnodejs --never
- haxelib git mcover https://github.com/AlexHaxe/mcover haxe_4_thread src
- haxelib git munit https://github.com/AlexHaxe/MassiveUnit haxe_4_thread src
- haxelib git mcover https://github.com/massiveinteractive/mcover master src
- haxelib git munit https://github.com/massiveinteractive/MassiveUnit master src
- haxelib git json2object https://github.com/elnabo/json2object
- haxelib install hxjava
- haxelib install mlib
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fixed indentation of nested object literals ([#479](https://github.com/HaxeCheckstyle/haxe-formatter/issues/479))
- Fixed array wrapping in call parameters, fixes [#466](https://github.com/HaxeCheckstyle/haxe-formatter/issues/466) ([#479](https://github.com/HaxeCheckstyle/haxe-formatter/issues/479))
- Fixed conditional using dot ident without parens, fixes [#480](https://github.com/HaxeCheckstyle/haxe-formatter/issues/480) ([#481](https://github.com/HaxeCheckstyle/haxe-formatter/issues/481))

## version 1.7.0 (2019-05-17)

Expand Down
31 changes: 31 additions & 0 deletions test/testcases/other/issue_480_conditional_with_dot_ident.hxtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{}

---

class Main {
static function main() {
#if target.sys
trace("Test");
#end
#if marco.sys
trace("Test");
#end

return foo #if target .sys #end;
}
}

---

class Main {
static function main() {
#if target.sys
trace("Test");
#end
#if marco.sys
trace("Test");
#end

return foo #if target .sys #end;
}
}

0 comments on commit e1d2977

Please sign in to comment.