Removed unused NodeFactory methods

This commit is contained in:
sanex
2020-12-29 17:21:03 +03:00
parent 3f5b2c6811
commit 22fb4b22ad
4 changed files with 3 additions and 93 deletions
-90
View File
@@ -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