All files / utils/types ISymbol.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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65                                                                                                                                 
import ESymbolKind from "./ESymbolKind";
import ESourceLanguage from "./ESourceLanguage";
import IParameterSymbol from "./IParameterSymbol";
 
/**
 * Represents a symbol collected from a source file
 */
interface ISymbol {
  /** Symbol name (e.g., "LED_toggle", "GPIO7", "uint32_t") */
  name: string;
 
  /** Kind of symbol */
  kind: ESymbolKind;
 
  /** Type of the symbol (e.g., "void", "u32", "int*") */
  type?: string;
 
  /** Source file where the symbol is defined */
  sourceFile: string;
 
  /** Line number in the source file */
  sourceLine: number;
 
  /** Source language */
  sourceLanguage: ESourceLanguage;
 
  /** Whether this symbol is exported/public */
  isExported: boolean;
 
  /** Whether this is a declaration (not definition) */
  isDeclaration?: boolean;
 
  /** Function signature for overload detection (e.g., "void foo(int, float)") */
  signature?: string;
 
  /** Function parameters with names, types, and modifiers for header generation */
  parameters?: IParameterSymbol[];
 
  /** Parent namespace or class name */
  parent?: string;
 
  /** Access modifier for register members (rw, ro, wo, w1c, w1s) */
  accessModifier?: string;
 
  /** For arrays: element count. For integers: bit width */
  size?: number;
 
  /** Issue #379: Whether this variable is an array */
  isArray?: boolean;
 
  /** Issue #379: Array dimensions for extern declarations (e.g., ["4"] or ["4", "8"]) */
  arrayDimensions?: string[];
 
  /** Issue #288: Whether this variable is const (for extern declarations) */
  isConst?: boolean;
 
  /** Issue #468: Whether this variable is atomic (volatile in C) */
  isAtomic?: boolean;
 
  /** Issue #461: Initial value expression for const variables (for resolving external array dimensions) */
  initialValue?: string;
}
 
export default ISymbol;