Skip to content

Commit

Permalink
fixed unary OpSub in array
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Mar 20, 2019
1 parent 5da7682 commit de33b8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/formatter/marker/MarkWhitespace.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MarkWhitespace extends MarkerBase {
var policy:WhitespacePolicy = config.whitespace.binopPolicy.remove(After);
var prev:TokenInfo = getPreviousToken(token);
switch (prev.token.tok) {
case POpen:
case POpen, BkOpen:
policy = policy.remove(Before);
default:
}
Expand Down
2 changes: 2 additions & 0 deletions test/testcases/whitespace/opsub_and_popen.hxtest
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Main {
static function main() {
var mIdeal = ((12 * sigma * sigma) -(-n * wl * -wl) -(4 * n * wl) -(3 * n)) / ((-4 * wl) -4);
tileTransform.setTo(1, 0, 0, 1, - tile.originX, - tile.originY);
var list = [-width, -height];
}
}

Expand All @@ -19,5 +20,6 @@ class Main {
static function main() {
var mIdeal = ((12 * sigma * sigma) - (-n * wl * -wl) - (4 * n * wl) - (3 * n)) / ((-4 * wl) - 4);
tileTransform.setTo(1, 0, 0, 1, -tile.originX, -tile.originY);
var list = [-width, -height];
}
}

0 comments on commit de33b8d

Please sign in to comment.