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
Copy file name to clipboardExpand all lines: src/Language/JavaScript/Process/Minify.hs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,7 @@ fixStmt a s (JSForConstOf _ _ _ e1 op e2 _ st) = JSForConstOf a emptyAnnot space
57
57
fixStmt a s (JSForOf _ _ e1 op e2 _ st) =JSForOf a emptyAnnot (fixEmpty e1) (fixSpace op) (fixSpace e2) emptyAnnot (fixStmtE s st)
58
58
fixStmt a s (JSForVarOf _ _ _ e1 op e2 _ st) =JSForVarOf a emptyAnnot spaceAnnot (fixEmpty e1) (fixSpace op) (fixSpace e2) emptyAnnot (fixStmtE s st)
59
59
fixStmt a s (JSFunction _ n _ ps _ blk _) =JSFunction a (fixSpace n) emptyAnnot (fixEmpty ps) emptyAnnot (fixEmpty blk) s
60
+
fixStmt a s (JSGenerator _ _ n _ ps _ blk _) =JSGenerator a emptyAnnot (fixEmpty n) emptyAnnot (fixEmpty ps) emptyAnnot (fixEmpty blk) s
60
61
fixStmt a s (JSIf _ _ e _ st) =JSIf a emptyAnnot (fixEmpty e) emptyAnnot (fixIfElseBlock emptyAnnot s st)
61
62
fixStmt a s (JSIfElse _ _ e _ (JSEmptyStatement _) _ sf) =JSIfElse a emptyAnnot (fixEmpty e) emptyAnnot (JSEmptyStatement emptyAnnot) emptyAnnot (fixStmt spaceAnnot s sf)
62
63
fixStmt a s (JSIfElse _ _ e _ st _ sf) =JSIfElse a emptyAnnot (fixEmpty e) emptyAnnot (mkStatementBlock noSemi st) emptyAnnot (fixIfElseBlock spaceAnnot s sf)
@@ -162,6 +163,7 @@ instance MinifyJS JSExpression where
162
163
fix a (JSExpressionPostfix e op) =JSExpressionPostfix (fix a e) (fixEmpty op)
163
164
fix a (JSExpressionTernary cond _ v1 _ v2) =JSExpressionTernary (fix a cond) emptyAnnot (fixEmpty v1) emptyAnnot (fixEmpty v2)
164
165
fix a (JSFunctionExpression _ n _ x2s _ x3) =JSFunctionExpression a (fixSpace n) emptyAnnot (fixEmpty x2s) emptyAnnot (fixEmpty x3)
166
+
fix a (JSGeneratorExpression _ _ n _ x2s _ x3) =JSGeneratorExpression a emptyAnnot (fixEmpty n) emptyAnnot (fixEmpty x2s) emptyAnnot (fixEmpty x3)
165
167
fix a (JSMemberDot xs _ n) =JSMemberDot (fix a xs) emptyAnnot (fixEmpty n)
166
168
fix a (JSMemberExpression e _ args _) =JSMemberExpression (fix a e) emptyAnnot (fixEmpty args) emptyAnnot
167
169
fix a (JSMemberNew _ n _ s _) =JSMemberNew a (fix spaceAnnot n) emptyAnnot (fixEmpty s) emptyAnnot
@@ -171,6 +173,8 @@ instance MinifyJS JSExpression where
171
173
fix a (JSTemplateLiteral t _ s ps) =JSTemplateLiteral (fmap (fix a) t) emptyAnnot s (map fixEmpty ps)
172
174
fix a (JSUnaryExpression op x) =let (ta, fop) = fixUnaryOp a op inJSUnaryExpression fop (fix ta x)
173
175
fix a (JSVarInitExpression x1 x2) =JSVarInitExpression (fix a x1) (fixEmpty x2)
176
+
fix a (JSYieldExpression _ x) =JSYieldExpression a (fixSpace x)
177
+
fix a (JSYieldFromExpression _ _ x) =JSYieldFromExpression a emptyAnnot (fixEmpty x)
174
178
fix a (JSSpreadExpression _ e) =JSSpreadExpression a (fixEmpty e)
0 commit comments