Files
privacy.sexy/tests/unit/shared/Stubs/FunctionCallCompilationContextStub.ts
undergroundwires c138f74460 Refactor to unify scripts/categories as Executable
This commit consolidates scripts and categories under a unified
'Executable' concept. This simplifies the architecture and improves code
readability.

- Introduce subfolders within `src/domain` to segregate domain elements.
- Update class and interface names by removing the 'I' prefix in
  alignment with new coding standards.
- Replace 'Node' with 'Executable' to clarify usage; reserve 'Node'
  exclusively for the UI's tree component.
2024-06-12 12:36:40 +02:00

28 lines
1.4 KiB
TypeScript

import type { FunctionCallCompilationContext } from '@/application/Parser/Executable/Script/Compiler/Function/Call/Compiler/FunctionCallCompilationContext';
import type { SingleCallCompiler } from '@/application/Parser/Executable/Script/Compiler/Function/Call/Compiler/SingleCall/SingleCallCompiler';
import type { FunctionCall } from '@/application/Parser/Executable/Script/Compiler/Function/Call/FunctionCall';
import type { ISharedFunctionCollection } from '@/application/Parser/Executable/Script/Compiler/Function/ISharedFunctionCollection';
import { SingleCallCompilerStub } from './SingleCallCompilerStub';
import { FunctionCallStub } from './FunctionCallStub';
import { SharedFunctionCollectionStub } from './SharedFunctionCollectionStub';
export class FunctionCallCompilationContextStub implements FunctionCallCompilationContext {
public allFunctions: ISharedFunctionCollection = new SharedFunctionCollectionStub();
public rootCallSequence: readonly FunctionCall[] = [
new FunctionCallStub(), new FunctionCallStub(),
];
public singleCallCompiler: SingleCallCompiler = new SingleCallCompilerStub();
public withSingleCallCompiler(singleCallCompiler: SingleCallCompiler): this {
this.singleCallCompiler = singleCallCompiler;
return this;
}
public withAllFunctions(allFunctions: ISharedFunctionCollection): this {
this.allFunctions = allFunctions;
return this;
}
}