Comparing version
@@ -514,3 +514,4 @@ "use strict"; | ||
AST.isArgument(part) || | ||
AST.isRedirect(part)) { | ||
AST.isRedirect(part) || | ||
AST.isSudo(part)) { | ||
flat = [...flat, part]; | ||
@@ -517,0 +518,0 @@ } |
{ | ||
"name": "kmdr-ast", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Traverse the AST of an explanation by kmdr", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -654,3 +654,4 @@ /** | ||
AST.isArgument(part) || | ||
AST.isRedirect(part) | ||
AST.isRedirect(part) || | ||
AST.isSudo(part) | ||
) { | ||
@@ -695,21 +696,4 @@ flat = [...flat, part]; | ||
} | ||
/* | ||
private static flattenRedirectNode(node: RedirectNode): FlatAST { | ||
let flat: FlatAST = []; | ||
for (const part of node.parts) { | ||
if (AST.isCommand(part)) { | ||
const flatCommandNode = AST.flattenCommandNode(part as CommandNode); | ||
flat = [...flat, ...flatCommandNode]; | ||
} else if (AST.isPipe(part)) { | ||
flat = [...flat, part]; | ||
} | ||
} | ||
return flat; | ||
} | ||
*/ | ||
} | ||
export default AST; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
76958
-0.4%1786
-0.67%