19#ifndef NSBACI_COMPILER_COMPILER_H
20#define NSBACI_COMPILER_COMPILER_H
24#include <unordered_map>
Base result class declaration for nsbaci services.
Represents an error with a message and optional code.
Definition error.h:28
virtual ~Compiler()=default
Virtual destructor.
Compiler()=default
Default constructor.
virtual CompilerResult compile(std::istream &input)=0
Compiles source code from an input stream.
virtual CompilerResult compile(const std::string &source)=0
Compiles source code from a string.
Type definitions for compiler-related operations.
Instruction definitions for nsbaci compiler.
Compiler namespace containing all compilation-related stuff.
std::vector< Instruction > InstructionStream
Vector of instructions representing a compiled program.
Definition instruction.h:210
Type definitions namespace for nsbaci (runtime-specific).
Root namespace for the nsbaci application.
Definition controller.cpp:26
Base result structure for all service operations.
Definition baseResult.h:56
BaseResult()
Default constructor creates a successful result.
Definition baseResult.h:60
Result of a compilation operation.
Definition compiler.h:47
nsbaci::types::SymbolTable symbols
Symbol table from compilation.
Definition compiler.h:73
CompilerResult()
Default constructor creates a successful empty result.
Definition compiler.h:51
CompilerResult(nsbaci::Error error)
Constructs a failed result from a single error.
Definition compiler.h:64
CompilerResult(std::vector< nsbaci::Error > errs)
Constructs a failed result from a vector of errors.
Definition compiler.h:57
InstructionStream instructions
Generated p-code instructions.
Definition compiler.h:72