mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Removed unused NodeFactory methods
This commit is contained in:
@@ -34,25 +34,6 @@ export class NodeFactory {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Pattern[]} params
|
||||
* @param {boolean} expression
|
||||
* @param {BlockStatement | Expression} body
|
||||
* @returns {ArrowFunctionExpression}
|
||||
*/
|
||||
public static arrowFunctionExpressionNode (
|
||||
params: ESTree.Pattern[],
|
||||
expression: boolean,
|
||||
body: ESTree.BlockStatement | ESTree.Expression
|
||||
): ESTree.ArrowFunctionExpression {
|
||||
return {
|
||||
type: NodeType.ArrowFunctionExpression,
|
||||
params,
|
||||
expression,
|
||||
body
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {AssignmentOperator} operator
|
||||
* @param {Pattern | MemberExpression} left
|
||||
@@ -137,23 +118,6 @@ export class NodeFactory {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Pattern | null} param
|
||||
* @param {BlockStatement} body
|
||||
* @returns {CatchClause}
|
||||
*/
|
||||
public static catchClauseNode (
|
||||
param: ESTree.Pattern | null,
|
||||
body: ESTree.BlockStatement
|
||||
): ESTree.CatchClause {
|
||||
return {
|
||||
type: NodeType.CatchClause,
|
||||
param,
|
||||
body,
|
||||
metadata: { ignoredNode: false }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ESTree.Expression} test
|
||||
* @param {ESTree.Expression} consequent
|
||||
@@ -522,60 +486,6 @@ export class NodeFactory {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ESTree.TemplateElement["value"]} value
|
||||
* @param {boolean} tail
|
||||
* @returns {ESTree.TemplateElement}
|
||||
*/
|
||||
public static templateElement (
|
||||
value: ESTree.TemplateElement['value'],
|
||||
tail: boolean
|
||||
): ESTree.TemplateElement {
|
||||
return {
|
||||
type: NodeType.TemplateElement,
|
||||
value,
|
||||
tail,
|
||||
metadata: { ignoredNode: false }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ESTree.Expression[]} expressions
|
||||
* @param {ESTree.TemplateElement[]} quasis
|
||||
* @returns {ESTree.TemplateLiteral}
|
||||
*/
|
||||
public static templateLiteral (
|
||||
expressions: ESTree.Expression[],
|
||||
quasis: ESTree.TemplateElement[]
|
||||
): ESTree.TemplateLiteral {
|
||||
return {
|
||||
type: NodeType.TemplateLiteral,
|
||||
expressions,
|
||||
quasis,
|
||||
metadata: { ignoredNode: false }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {BlockStatement} block
|
||||
* @param {CatchClause | null} handler
|
||||
* @param {BlockStatement | null} finalizer
|
||||
* @returns {TryStatement}
|
||||
*/
|
||||
public static tryStatement (
|
||||
block: ESTree.BlockStatement,
|
||||
handler?: ESTree.CatchClause | null,
|
||||
finalizer?: ESTree.BlockStatement | null
|
||||
): ESTree.TryStatement {
|
||||
return {
|
||||
type: NodeType.TryStatement,
|
||||
block,
|
||||
handler,
|
||||
finalizer,
|
||||
metadata: { ignoredNode: false }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {VariableDeclarator[]} declarations
|
||||
* @param {string} kind
|
||||
|
||||
Reference in New Issue
Block a user