service identifiers name change

This commit is contained in:
sanex3339
2016-12-21 19:10:37 +03:00
parent 8d390178a3
commit 435370687a
36 changed files with 259 additions and 244 deletions
+10 -13
View File
@@ -7,13 +7,13 @@ import { NodeType } from '../enums/NodeType';
export class Nodes {
/**
* @param bodyNodes
* @param body
* @returns {ESTree.Program}
*/
public static getProgramNode (bodyNodes: TStatement[] = []): ESTree.Program {
public static getProgramNode (body: TStatement[] = []): ESTree.Program {
return {
type: NodeType.Program,
body: bodyNodes,
body,
sourceType: 'script',
obfuscated: false
};
@@ -40,26 +40,26 @@ export class Nodes {
}
/**
* @param bodyNodes
* @param body
* @returns {ESTree.BlockStatement}
*/
public static getBlockStatementNode (bodyNodes: ESTree.Statement[] = []): ESTree.BlockStatement {
public static getBlockStatementNode (body: ESTree.Statement[] = []): ESTree.BlockStatement {
return {
type: NodeType.BlockStatement,
body: bodyNodes,
body,
obfuscated: false
};
}
/**
* @param bodyNodes
* @param body
* @returns {ESTree.CatchClause}
*/
public static getCatchClauseNode (bodyNodes: ESTree.Statement[] = []): ESTree.CatchClause {
public static getCatchClauseNode (body: ESTree.Statement[] = []): ESTree.CatchClause {
return {
type: NodeType.CatchClause,
param: Nodes.getIdentifierNode('err'),
body: Nodes.getBlockStatementNode(bodyNodes),
body: Nodes.getBlockStatementNode(body),
obfuscated: false
};
}
@@ -137,10 +137,7 @@ export class Nodes {
* @param consequent
* @returns {ESTree.IfStatement}
*/
public static getIfStatementNode (
test: ESTree.Expression,
consequent: ESTree.BlockStatement,
): ESTree.IfStatement {
public static getIfStatementNode (test: ESTree.Expression, consequent: ESTree.BlockStatement,): ESTree.IfStatement {
return {
type: NodeType.IfStatement,
test,