JavaScript: Introduce new library predicate for computing whitespace around binary operators.

This commit is contained in:
Max Schaefer
2018-09-28 13:04:36 +01:00
parent 829a5cc451
commit a63b7fc215
5 changed files with 29 additions and 27 deletions

View File

@@ -1,2 +1,3 @@
| tst.js:2:9:2:16 | x + x>>1 | Whitespace around nested operators contradicts precedence. |
| tst.js:42:9:42:20 | p in o&&o[p] | Whitespace around nested operators contradicts precedence. |
| tst.js:49:1:49:12 | x + x >> 1 | Whitespace around nested operators contradicts precedence. |

View File

@@ -44,3 +44,9 @@ function ok10(o, p) {
// OK
x==y ** 2;
// NOT OK
x + x >> 1
// OK
x + x >> 1