Skip to content

Commit

Permalink
fixed indentation for anon function calls, fixes #315 (#352)
Browse files Browse the repository at this point in the history
* fixed indentation for anon function calls, fixes #315
* fixed indentation of untyped assignment, fixes #326
  • Loading branch information
AlexHaxe authored Feb 16, 2019
1 parent dc80a32 commit 3c7ca38
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
- Fixed braceless if body with conditionals, fixes [#328](https://github.com/HaxeCheckstyle/haxe-formatter/issues/328) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351))
- Fixed complex conditional typedef, fixes [#336](https://github.com/HaxeCheckstyle/haxe-formatter/issues/336) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351))
- Fixed parameter wrapping with multiline string, fixes [#320](https://github.com/HaxeCheckstyle/haxe-formatter/issues/320) ([#351](https://github.com/HaxeCheckstyle/haxe-formatter/issues/351))
- Fixed indentation of untyped assignment, fixes [#326](https://github.com/HaxeCheckstyle/haxe-formatter/issues/326) ([#352](https://github.com/HaxeCheckstyle/haxe-formatter/issues/352))
- Fixed indentation of anon function call, fixes [#315](https://github.com/HaxeCheckstyle/haxe-formatter/issues/315) ([#352](https://github.com/HaxeCheckstyle/haxe-formatter/issues/352))

## version 1.4.0 (2019-02-07)

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

---

class Main {
static function main() {
context.subscriptions.push(Vscode.commands.registerCommand("hellohaxe.sayHello", function() {
Vscode.window.showInformationMessage("Hello from Haxe!");
}));
}
}

---

class Main {
static function main() {
context.subscriptions.push(Vscode.commands.registerCommand("hellohaxe.sayHello", function() {
Vscode.window.showInformationMessage("Hello from Haxe!");
}));
}
}
22 changes: 22 additions & 0 deletions test/testcases/indentation/issue_326_untyped_assignment.hxtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
}

---

class Main {
public static function main() {
(untyped foo).bar = function() {
trace();
}
}
}

---

class Main {
public static function main() {
(untyped foo).bar = function() {
trace();
}
}
}

0 comments on commit 3c7ca38

Please sign in to comment.