You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// port from [closure-compiler](https://github.com/google/closure-compiler/blob/09094b551915a6487a980a783831cba58b5739d1/src/com/google/javascript/jscomp/PeepholeFoldConstants.java#L587)
643
-
pubfntry_fold_logical_expression(
651
+
pubfntry_fold_and_or(
644
652
&self,
645
653
logical_expr:&mutLogicalExpression<'a>,
646
654
ctx:&mutTraverseCtx<'a>,
647
655
) -> Option<Expression<'a>>{
648
-
if ctx.ancestry.parent().is_tagged_template_expression(){
649
-
returnNone;
650
-
}
651
656
let op = logical_expr.operator;
652
-
if !matches!(op,LogicalOperator::And | LogicalOperator::Or){
/// port from [closure-compiler](https://github.com/google/closure-compiler/blob/f3ce5ed8b630428e311fe9aa2e20d36560d975e2/src/com/google/javascript/jscomp/AstAnalyzer.java#L241)
10
9
/// Returns true if some node in n's subtree changes application state. If
11
10
/// `check_for_new_objects` is true, we assume that newly created mutable objects (like object
12
11
/// literals) change state. Otherwise, we assume that they have no side effects.
12
+
///
13
+
/// Ported from [closure-compiler](https://github.com/google/closure-compiler/blob/f3ce5ed8b630428e311fe9aa2e20d36560d975e2/src/com/google/javascript/jscomp/AstAnalyzer.java#L241)
/// port from [closure-compiler](https://github.com/google/closure-compiler/blob/f3ce5ed8b630428e311fe9aa2e20d36560d975e2/src/com/google/javascript/jscomp/AstAnalyzer.java#L94)
6
5
/// Returns true if the node which may have side effects when executed.
7
6
/// This version default to the "safe" assumptions when the compiler object
8
7
/// is not provided (RegExp have side-effects, etc).
8
+
///
9
+
/// Ported from [closure-compiler](https://github.com/google/closure-compiler/blob/f3ce5ed8b630428e311fe9aa2e20d36560d975e2/src/com/google/javascript/jscomp/AstAnalyzer.java#L94)
0 commit comments