#include <map>
#include <set>
+#include <cstdio>
#include <cstdlib>
#include "location.hh"
struct CYScope {
CYScope *parent_;
- CYIdentifierAddressFlagsMap internal_;
+ CYIdentifierAddressFlagsMap internal_;
CYIdentifierValueSet identifiers_;
CYScope() :
};
struct CYProgram :
- CYScope,
CYThing
{
CYStatement *statements_;
- CYIdentifierUsageVector rename_;
CYProgram(CYStatement *statements) :
statements_(statements)
virtual void Output(CYOutput &out) const;
};
-struct CYContext :
- CYScope
-{
+struct CYContext {
apr_pool_t *pool_;
CYOptions &options_;
CYScope *scope_;
- CYProgram *program_;
+ CYIdentifierUsageVector rename_;
CYContext(apr_pool_t *pool, CYOptions &options) :
pool_(pool),
options_(options),
- scope_(this),
- program_(NULL)
+ scope_(NULL)
{
}
CYThing
{
CYStatement *statements_;
- CYScope *scope_;
- CYBlock(CYStatement *statements, CYScope *scope = NULL) :
- statements_(statements),
- scope_(scope)
+ CYBlock(CYStatement *statements) :
+ statements_(statements)
{
}
virtual void Output(CYOutput &out, CYFlags flags) const;
};
-struct CYFunction :
- CYScope
-{
+struct CYFunction {
CYIdentifier *name_;
CYFunctionParameter *parameters_;
CYBlock code_;
CYFunction(CYIdentifier *name, CYFunctionParameter *parameters, CYStatement *statements) :
name_(name),
parameters_(parameters),
- code_(statements, this)
+ code_(statements)
{
}