19#ifndef NSBACI_COMPILERSERVICE_H
20#define NSBACI_COMPILERSERVICE_H
74 std::make_unique<nsbaci::compiler::NsbaciCompiler>());
134 std::unique_ptr<nsbaci::compiler::Compiler>
137 lastCompiledInstructions;
140 bool programReady =
false;
CompilerService(std::unique_ptr< nsbaci::compiler::Compiler > c=std::make_unique< nsbaci::compiler::NsbaciCompiler >())
Constructs the CompilerService with a compiler implementation.
Definition compilerService.cpp:17
nsbaci::types::SymbolTable takeSymbols()
Retrieves and releases ownership of the symbol table.
Definition compilerService.cpp:55
nsbaci::compiler::InstructionStream takeInstructions()
Retrieves and releases ownership of the compiled instructions.
Definition compilerService.cpp:50
~CompilerService()=default
Default destructor.
bool hasProgramReady() const
Checks if a compiled program is available for execution.
Definition compilerService.cpp:48
nsbaci::compiler::CompilerResult compile(nsbaci::types::Text raw)
Compiles nsbaci source code into p-code instructions.
Definition compilerService.cpp:20
Abstract Compiler class declaration for nsbaci.
Error class declaration for nsbaci.
Type definitions for file-related operations.
std::vector< Instruction > InstructionStream
Vector of instructions representing a compiled program.
Definition instruction.h:210
Services namespace containing all backend service implementations.
Definition compilerService.cpp:15
std::string Text
Alias for text content (file contents, source code, etc.).
Definition fileTypes.h:30
std::unordered_map< VarName, SymbolInfo > SymbolTable
Lookup table mapping variable names to their symbol info.
Definition compilerTypes.h:42
NsbaciCompiler class declaration for nsbaci.
Result of a compilation operation.
Definition compiler.h:47