All files / transpiler/output/codegen/generators IGeneratorInput.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49                                                                                                 
/**
 * Read-only input built before generation begins.
 * Contains all the context a generator needs to produce code.
 * Immutable - generators cannot modify this.
 */
import TTypeInfo from "../types/TTypeInfo";
import IFunctionSignature from "../types/IFunctionSignature";
import ICallbackTypeInfo from "../types/ICallbackTypeInfo";
import ITargetCapabilities from "../types/ITargetCapabilities";
import SymbolTable from "../../../logic/symbols/SymbolTable";
import ICodeGenSymbols from "../../../types/ICodeGenSymbols";
 
interface IGeneratorInput {
  /** Symbol table from parsed C/C++ headers (may be null for single-file transpilation) */
  readonly symbolTable: SymbolTable | null;
 
  /** C-Next symbols collected from the parse tree (enums, structs, scopes, etc.) */
  readonly symbols: ICodeGenSymbols | null;
 
  /** Variable type information indexed by scoped name */
  readonly typeRegistry: ReadonlyMap<string, TTypeInfo>;
 
  /** Function signatures for parameter validation */
  readonly functionSignatures: ReadonlyMap<string, IFunctionSignature>;
 
  /** Set of C-Next defined function names */
  readonly knownFunctions: ReadonlySet<string>;
 
  /** Set of known struct type names */
  readonly knownStructs: ReadonlySet<string>;
 
  /** Compile-time constant values (for array sizes, etc.) */
  readonly constValues: ReadonlyMap<string, number>;
 
  /** Callback/function-as-type definitions */
  readonly callbackTypes: ReadonlyMap<string, ICallbackTypeInfo>;
 
  /** Callback types used as struct field types: "StructName.fieldName" -> callback type name */
  readonly callbackFieldTypes: ReadonlyMap<string, string>;
 
  /** Target platform capabilities (affects atomic operations, etc.) */
  readonly targetCapabilities: ITargetCapabilities;
 
  /** Debug mode - affects overflow helper generation */
  readonly debugMode: boolean;
}
 
export default IGeneratorInput;