Files
BlitzNext/compiler/environ.hpp
T
Michael Fabian 'Xaymar' Dirks 0065ff4328 compiler: CMake-ify
2019-01-18 15:55:51 +01:00

43 lines
734 B
C++

/*
An environ represent a stack frame block.
*/
#ifndef ENVIRON_H
#define ENVIRON_H
#include "type.hpp"
#include "decl.hpp"
#include "label.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