Documentation
¶
Overview ¶
Package compiler handles SIMPL Windows compilation orchestration and result parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCompileTimeLine ¶
ParseCompileTimeLine parses a line like "Compile Time: 0.23 seconds" and returns (0.23, true) if matched, else (0, false).
func ParseStatLine ¶
ParseStatLine parses a line like "Program Warnings: 1" and returns (1, true) if matched, else (0, false).
Types ¶
type CompileDependencies ¶
type CompileDependencies struct {
ProcessMgr interfaces.ProcessManager
WindowMgr interfaces.WindowManager
Keyboard interfaces.KeyboardInjector
ControlReader interfaces.ControlReader
}
CompileDependencies holds all external dependencies for testing
type CompileOptions ¶
type CompileOptions struct {
FilePath string
RecompileAll bool
Hwnd uintptr
SimplPid uint32 // Known PID from ShellExecuteEx (preferred over searching)
SimplPidPtr *uint32 // Pointer to store PID for signal handlers
SkipPreCompilationDialogCheck bool // For testing - skip the pre-compilation dialog check
CompilationTimeout time.Duration // Override default timeout (0 = use default 5 minutes)
}
CompileOptions holds options for the compilation
type CompileResult ¶
type CompileResult struct {
Warnings int
Notices int
Errors int
CompileTime float64
ErrorMessages []string
WarningMessages []string
NoticeMessages []string
HasErrors bool
}
CompileResult holds the results of a compilation
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler orchestrates the compilation process with injected dependencies
func NewCompiler ¶
func NewCompiler(log logger.LoggerInterface) *Compiler
NewCompiler creates a new Compiler with the provided logger and default dependencies
func NewCompilerWithDeps ¶
func NewCompilerWithDeps(log logger.LoggerInterface, deps *CompileDependencies) *Compiler
NewCompilerWithDeps creates a new Compiler with custom dependencies for testing
func (*Compiler) Compile ¶
func (c *Compiler) Compile(opts CompileOptions) (*CompileResult, error)
Compile orchestrates the compilation process for a SIMPL Windows file This includes: - Handling pre-compilation dialogs - Triggering the compile - Monitoring compilation progress - Parsing results - Closing dialogs