WIP: trying to remove some logic from node groups classes

This commit is contained in:
sanex3339
2020-07-11 11:53:36 +03:00
parent 2c58db28ef
commit 631cd9b3cf
5 changed files with 7 additions and 12 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
@@ -22,7 +22,6 @@ import { CallsControllerFunctionCodeHelper } from '../../calls-controller/CallsC
import { ConsoleOutputDisableCodeHelper } from '../ConsoleOutputDisableCodeHelper';
import { NodeAppender } from '../../../node/NodeAppender';
import { NodeLexicalScopeUtils } from '../../../node/NodeLexicalScopeUtils';
import { NodeGuards } from '../../../node/NodeGuards';
@injectable()
export class ConsoleOutputCodeHelperGroup extends AbstractCustomCodeHelperGroup {
@@ -82,13 +81,11 @@ export class ConsoleOutputCodeHelperGroup extends AbstractCustomCodeHelperGroup
.getLexicalScope(consoleOutputDisableHostNode) ?? null;
const consoleOutputDisableFunctionName: string = consoleOutputDisableLexicalScopeNode
&& NodeGuards.isProgramNode(consoleOutputDisableLexicalScopeNode)
? this.identifierNamesGenerator.generate(consoleOutputDisableLexicalScopeNode)
: this.randomGenerator.getRandomString(5);
: this.identifierNamesGenerator.generateNext();
const callsControllerFunctionName: string = consoleOutputDisableLexicalScopeNode
&& NodeGuards.isProgramNode(consoleOutputDisableLexicalScopeNode)
? this.identifierNamesGenerator.generate(consoleOutputDisableLexicalScopeNode)
: this.randomGenerator.getRandomString(5);
: this.identifierNamesGenerator.generateNext();
// consoleOutputDisableExpression helper nodes append
this.appendCustomNodeIfExist(
@@ -84,13 +84,11 @@ export class DebugProtectionCodeHelperGroup extends AbstractCustomCodeHelperGrou
.getLexicalScope(debugProtectionFunctionCallHostNode) ?? null;
const debugProtectionFunctionName: string = debugProtectionFunctionCallScopeNode
&& NodeGuards.isProgramNode(debugProtectionFunctionCallScopeNode)
? this.identifierNamesGenerator.generate(debugProtectionFunctionCallScopeNode)
: this.randomGenerator.getRandomString(5);
: this.identifierNamesGenerator.generateNext();
const callsControllerFunctionName: string = debugProtectionFunctionCallScopeNode
&& NodeGuards.isProgramNode(debugProtectionFunctionCallScopeNode)
? this.identifierNamesGenerator.generate(debugProtectionFunctionCallScopeNode)
: this.randomGenerator.getRandomString(5);
: this.identifierNamesGenerator.generateNext();
// debugProtectionFunctionCall helper nodes append
this.appendCustomNodeIfExist(