Significantly reduce the tendrils of DeclSpecs/Declarator/Declaration code
The stuff in decl.h/decl.cpp is messy, largely due to its close mapping to C-style variable declarations. This checkin has updated code throughout all of the declaration statement, variable, and function code that operates on symbols and types directly. Thus, Decl* related stuff is now localized to decl.h/decl.cpp and the parser. Issue #13.
This commit is contained in:
6
ast.cpp
6
ast.cpp
@@ -36,9 +36,7 @@
|
||||
*/
|
||||
|
||||
#include "ast.h"
|
||||
#include "decl.h"
|
||||
#include "func.h"
|
||||
#include "type.h"
|
||||
#include "sym.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -52,8 +50,8 @@ ASTNode::~ASTNode() {
|
||||
// AST
|
||||
|
||||
void
|
||||
AST::AddFunction(DeclSpecs *ds, Declarator *decl, Stmt *code) {
|
||||
functions.push_back(new Function(ds, decl, code));
|
||||
AST::AddFunction(Symbol *sym, const std::vector<Symbol *> &args, Stmt *code) {
|
||||
functions.push_back(new Function(sym, args, code));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user