mirror of
https://github.com/mrkite/regs.git
synced 2024-11-26 00:49:17 +00:00
22 lines
511 B
C++
22 lines
511 B
C++
/** @copyright 2020 Sean Kasun */
|
|
#pragma once
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include "types.h"
|
|
|
|
class Compiler {
|
|
public:
|
|
bool run(std::map<std::string, Symbol> &symbols);
|
|
|
|
private:
|
|
int numErrors;
|
|
bool calculateSizes(Symbol *s);
|
|
int32_t calcRefSize(Ref *ref, Symbol *parent);
|
|
int32_t calcStructSize(Struct *s, Symbol *parent);
|
|
int32_t calcUnionSize(Struct *s, Symbol *parent);
|
|
|
|
bool refErr(Symbol *symbol, const char *format, ...);
|
|
bool defErr(Symbol *symbol, const char *format, ...);
|
|
};
|