Files
BlitzNext/compiler/environ.hpp
T
Michael Fabian 'Xaymar' Dirks c9ff5b8ca4 compiler: Formatting
2019-01-18 17:04:57 +01:00

43 lines
759 B
C++

/*
An environ represent a stack frame block.
*/
#ifndef ENVIRON_H
#define ENVIRON_H
#include "decl.hpp"
#include "label.hpp"
#include "type.hpp"
class Environ {
public:
int level;
DeclSeq* decls;
DeclSeq* funcDecls;
DeclSeq* typeDecls;
vector<Type*> types;
vector<Label*> labels;
Environ* globals;
Type* returnType;
string funcLabel, breakLabel;
list<Environ*> children; //for delete!
Environ(const string& f, Type* r, int l, Environ* gs);
~Environ();
Decl* findDecl(const string& s);
Decl* findFunc(const string& s);
Type* findType(const string& s);
Label* findLabel(const string& s);
Label* insertLabel(const string& s, int def, int src, int sz);
string setBreak(const string& s);
};
#endif