Files
test-repo/tests/format/js/binary-expression/comment.js
T
2026-09-11 17:15:23 +08:00

66 lines
1.1 KiB
JavaScript

a = (
// Comment 1
(Math.random() * (yRange * (1 - minVerticalFraction)))
+ (minVerticalFraction * yRange)
) - offset;
a +
a +
a + // comment
a +
a;
a &&
longLongLongLongLongLongLongLongLong &&
longLongLongLongLongLongLongLongLong && // comment
longLongLongLongLongLongLongLongLong &&
longLongLongLongLongLongLongLongLong
a ||
longLongLongLongLongLongLongLongLong ||
longLongLongLongLongLongLongLongLong || // comment
longLongLongLongLongLongLongLongLong ||
longLongLongLongLongLongLongLongLong
var a = x(abifornCringerMoshedPerplexSawder
+ kochabCooieGameOnOboleUnweave // f
+ glimseGlyphsHazardNoopsTieTie+bifornCringerMoshedPerplexSawder);
foo[
a +
a + // comment
a +
bar[
b +
b +
b + // comment
b +
b
]
];
!(
a +
a + // comment
a +
!(
b +
b +
b + // comment
b +
b
)
);
const logical_expression =
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /* trailing comment */ &&
/* leading comment */ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb &&
// line comment
cccccccccccccccccccccccc;
const bc = a /* internal before */ || /* internal after */ b;
a +
/**/
a.a().a();