compiler: Formatting

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-01-18 17:04:57 +01:00
parent 79cc5fae95
commit c9ff5b8ca4
34 changed files with 7101 additions and 3392 deletions
+20 -18
View File
@@ -2,38 +2,40 @@
#ifndef PROGNODE_H
#define PROGNODE_H
#include "node.hpp"
#include "codegen.hpp"
#include "node.hpp"
struct UserFunc{
string ident,proc,lib;
UserFunc( const UserFunc &t ):ident(t.ident),proc(t.proc),lib(t.lib){}
UserFunc( const string &id,const string &pr,const string &lb ):ident(id),proc(pr),lib(lb){}
struct UserFunc {
string ident, proc, lib;
UserFunc(const UserFunc& t) : ident(t.ident), proc(t.proc), lib(t.lib) {}
UserFunc(const string& id, const string& pr, const string& lb) : ident(id), proc(pr), lib(lb) {}
};
struct ProgNode : public Node{
struct ProgNode : public Node {
DeclSeqNode* consts;
DeclSeqNode* structs;
DeclSeqNode* funcs;
DeclSeqNode* datas;
StmtSeqNode* stmts;
DeclSeqNode *consts;
DeclSeqNode *structs;
DeclSeqNode *funcs;
DeclSeqNode *datas;
StmtSeqNode *stmts;
Environ *sem_env;
Environ* sem_env;
string file_lab;
ProgNode( DeclSeqNode *c,DeclSeqNode *s,DeclSeqNode *f,DeclSeqNode *d,StmtSeqNode *ss ):consts(c),structs(s),funcs(f),datas(d),stmts(ss){}
~ProgNode(){
ProgNode(DeclSeqNode* c, DeclSeqNode* s, DeclSeqNode* f, DeclSeqNode* d, StmtSeqNode* ss)
: consts(c), structs(s), funcs(f), datas(d), stmts(ss)
{}
~ProgNode()
{
delete consts;
delete structs;
delete funcs;
delete datas;
delete stmts;
delete stmts;
}
Environ *semant( Environ *e );
void translate( Codegen *g,const vector<UserFunc> &userfuncs );
Environ* semant(Environ* e);
void translate(Codegen* g, const vector<UserFunc>& userfuncs);
};
#endif