Commit 5c5bf96b authored by Boxiang Sun's avatar Boxiang Sun

add override keyword to make gcc 5 happy

parent 91b65a3b
...@@ -279,7 +279,7 @@ class AST_alias : public AST { ...@@ -279,7 +279,7 @@ class AST_alias : public AST {
public: public:
InternedString name, asname; InternedString name, asname;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_alias(InternedString name, InternedString asname) : AST(AST_TYPE::alias), name(name), asname(asname) {} AST_alias(InternedString name, InternedString asname) : AST(AST_TYPE::alias), name(name), asname(asname) {}
...@@ -295,7 +295,7 @@ public: ...@@ -295,7 +295,7 @@ public:
AST_Name* kwarg = NULL, * vararg = NULL; AST_Name* kwarg = NULL, * vararg = NULL;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_arguments() : AST(AST_TYPE::arguments) {} AST_arguments() : AST(AST_TYPE::arguments) {}
...@@ -306,8 +306,8 @@ class AST_Assert : public AST_stmt { ...@@ -306,8 +306,8 @@ class AST_Assert : public AST_stmt {
public: public:
AST_expr* msg, *test; AST_expr* msg, *test;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Assert() : AST_stmt(AST_TYPE::Assert) {} AST_Assert() : AST_stmt(AST_TYPE::Assert) {}
...@@ -319,8 +319,8 @@ public: ...@@ -319,8 +319,8 @@ public:
std::vector<AST_expr*> targets; std::vector<AST_expr*> targets;
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Assign() : AST_stmt(AST_TYPE::Assign) {} AST_Assign() : AST_stmt(AST_TYPE::Assign) {}
...@@ -333,8 +333,8 @@ public: ...@@ -333,8 +333,8 @@ public:
AST_expr* target; AST_expr* target;
AST_TYPE::AST_TYPE op_type; AST_TYPE::AST_TYPE op_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_AugAssign() : AST_stmt(AST_TYPE::AugAssign) {} AST_AugAssign() : AST_stmt(AST_TYPE::AugAssign) {}
...@@ -346,7 +346,7 @@ public: ...@@ -346,7 +346,7 @@ public:
AST_TYPE::AST_TYPE op_type; AST_TYPE::AST_TYPE op_type;
AST_expr* left, *right; AST_expr* left, *right;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_AugBinOp() : AST_expr(AST_TYPE::AugBinOp) {} AST_AugBinOp() : AST_expr(AST_TYPE::AugBinOp) {}
...@@ -359,7 +359,7 @@ public: ...@@ -359,7 +359,7 @@ public:
AST_TYPE::AST_TYPE ctx_type; AST_TYPE::AST_TYPE ctx_type;
InternedString attr; InternedString attr;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Attribute() : AST_expr(AST_TYPE::Attribute) {} AST_Attribute() : AST_expr(AST_TYPE::Attribute) {}
...@@ -374,7 +374,7 @@ public: ...@@ -374,7 +374,7 @@ public:
AST_TYPE::AST_TYPE op_type; AST_TYPE::AST_TYPE op_type;
AST_expr* left, *right; AST_expr* left, *right;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_BinOp() : AST_expr(AST_TYPE::BinOp) {} AST_BinOp() : AST_expr(AST_TYPE::BinOp) {}
...@@ -386,7 +386,7 @@ public: ...@@ -386,7 +386,7 @@ public:
AST_TYPE::AST_TYPE op_type; AST_TYPE::AST_TYPE op_type;
std::vector<AST_expr*> values; std::vector<AST_expr*> values;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_BoolOp() : AST_expr(AST_TYPE::BoolOp) {} AST_BoolOp() : AST_expr(AST_TYPE::BoolOp) {}
...@@ -395,8 +395,8 @@ public: ...@@ -395,8 +395,8 @@ public:
class AST_Break : public AST_stmt { class AST_Break : public AST_stmt {
public: public:
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Break() : AST_stmt(AST_TYPE::Break) {} AST_Break() : AST_stmt(AST_TYPE::Break) {}
...@@ -409,7 +409,7 @@ public: ...@@ -409,7 +409,7 @@ public:
std::vector<AST_expr*> args; std::vector<AST_expr*> args;
std::vector<AST_keyword*> keywords; std::vector<AST_keyword*> keywords;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Call() : AST_expr(AST_TYPE::Call) {} AST_Call() : AST_expr(AST_TYPE::Call) {}
...@@ -422,7 +422,7 @@ public: ...@@ -422,7 +422,7 @@ public:
std::vector<AST_expr*> comparators; std::vector<AST_expr*> comparators;
AST_expr* left; AST_expr* left;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Compare() : AST_expr(AST_TYPE::Compare) {} AST_Compare() : AST_expr(AST_TYPE::Compare) {}
...@@ -435,7 +435,7 @@ public: ...@@ -435,7 +435,7 @@ public:
AST_expr* iter; AST_expr* iter;
std::vector<AST_expr*> ifs; std::vector<AST_expr*> ifs;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_comprehension() : AST(AST_TYPE::comprehension) {} AST_comprehension() : AST(AST_TYPE::comprehension) {}
...@@ -444,8 +444,8 @@ public: ...@@ -444,8 +444,8 @@ public:
class AST_ClassDef : public AST_stmt { class AST_ClassDef : public AST_stmt {
public: public:
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
std::vector<AST_expr*> bases, decorator_list; std::vector<AST_expr*> bases, decorator_list;
std::vector<AST_stmt*> body; std::vector<AST_stmt*> body;
...@@ -458,8 +458,8 @@ public: ...@@ -458,8 +458,8 @@ public:
class AST_Continue : public AST_stmt { class AST_Continue : public AST_stmt {
public: public:
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Continue() : AST_stmt(AST_TYPE::Continue) {} AST_Continue() : AST_stmt(AST_TYPE::Continue) {}
...@@ -470,7 +470,7 @@ class AST_Dict : public AST_expr { ...@@ -470,7 +470,7 @@ class AST_Dict : public AST_expr {
public: public:
std::vector<AST_expr*> keys, values; std::vector<AST_expr*> keys, values;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Dict() : AST_expr(AST_TYPE::Dict) {} AST_Dict() : AST_expr(AST_TYPE::Dict) {}
...@@ -482,7 +482,7 @@ public: ...@@ -482,7 +482,7 @@ public:
std::vector<AST_comprehension*> generators; std::vector<AST_comprehension*> generators;
AST_expr* key, *value; AST_expr* key, *value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_DictComp() : AST_expr(AST_TYPE::DictComp) {} AST_DictComp() : AST_expr(AST_TYPE::DictComp) {}
...@@ -492,8 +492,8 @@ public: ...@@ -492,8 +492,8 @@ public:
class AST_Delete : public AST_stmt { class AST_Delete : public AST_stmt {
public: public:
std::vector<AST_expr*> targets; std::vector<AST_expr*> targets;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Delete() : AST_stmt(AST_TYPE::Delete) {} AST_Delete() : AST_stmt(AST_TYPE::Delete) {}
...@@ -502,7 +502,7 @@ public: ...@@ -502,7 +502,7 @@ public:
class AST_Ellipsis : public AST_slice { class AST_Ellipsis : public AST_slice {
public: public:
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Ellipsis() : AST_slice(AST_TYPE::Ellipsis) {} AST_Ellipsis() : AST_slice(AST_TYPE::Ellipsis) {}
...@@ -513,8 +513,8 @@ class AST_Expr : public AST_stmt { ...@@ -513,8 +513,8 @@ class AST_Expr : public AST_stmt {
public: public:
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Expr() : AST_stmt(AST_TYPE::Expr) {} AST_Expr() : AST_stmt(AST_TYPE::Expr) {}
AST_Expr(AST_expr* value) : AST_stmt(AST_TYPE::Expr), value(value) {} AST_Expr(AST_expr* value) : AST_stmt(AST_TYPE::Expr), value(value) {}
...@@ -528,7 +528,7 @@ public: ...@@ -528,7 +528,7 @@ public:
AST_expr* type; // can be NULL for a bare "except:" clause AST_expr* type; // can be NULL for a bare "except:" clause
AST_expr* name; // can be NULL if the exception doesn't get a name AST_expr* name; // can be NULL if the exception doesn't get a name
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_ExceptHandler() : AST(AST_TYPE::ExceptHandler) {} AST_ExceptHandler() : AST(AST_TYPE::ExceptHandler) {}
...@@ -541,8 +541,8 @@ public: ...@@ -541,8 +541,8 @@ public:
AST_expr* globals; AST_expr* globals;
AST_expr* locals; AST_expr* locals;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Exec() : AST_stmt(AST_TYPE::Exec) {} AST_Exec() : AST_stmt(AST_TYPE::Exec) {}
...@@ -557,7 +557,7 @@ public: ...@@ -557,7 +557,7 @@ public:
// this should be an expr but we convert it into a AST_Return(AST_expr) to make the code simpler // this should be an expr but we convert it into a AST_Return(AST_expr) to make the code simpler
AST_stmt* body; AST_stmt* body;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Expression(std::unique_ptr<InternedStringPool> interned_strings) AST_Expression(std::unique_ptr<InternedStringPool> interned_strings)
: AST(AST_TYPE::Expression), interned_strings(std::move(interned_strings)) {} : AST(AST_TYPE::Expression), interned_strings(std::move(interned_strings)) {}
...@@ -569,7 +569,7 @@ class AST_ExtSlice : public AST_slice { ...@@ -569,7 +569,7 @@ class AST_ExtSlice : public AST_slice {
public: public:
std::vector<AST_slice*> dims; std::vector<AST_slice*> dims;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_ExtSlice() : AST_slice(AST_TYPE::ExtSlice) {} AST_ExtSlice() : AST_slice(AST_TYPE::ExtSlice) {}
...@@ -581,8 +581,8 @@ public: ...@@ -581,8 +581,8 @@ public:
std::vector<AST_stmt*> body, orelse; std::vector<AST_stmt*> body, orelse;
AST_expr* target, *iter; AST_expr* target, *iter;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_For() : AST_stmt(AST_TYPE::For) {} AST_For() : AST_stmt(AST_TYPE::For) {}
...@@ -596,8 +596,8 @@ public: ...@@ -596,8 +596,8 @@ public:
InternedString name; // if the name is not set this is a lambda InternedString name; // if the name is not set this is a lambda
AST_arguments* args; AST_arguments* args;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_FunctionDef() : AST_stmt(AST_TYPE::FunctionDef) {} AST_FunctionDef() : AST_stmt(AST_TYPE::FunctionDef) {}
...@@ -609,7 +609,7 @@ public: ...@@ -609,7 +609,7 @@ public:
std::vector<AST_comprehension*> generators; std::vector<AST_comprehension*> generators;
AST_expr* elt; AST_expr* elt;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_GeneratorExp() : AST_expr(AST_TYPE::GeneratorExp) {} AST_GeneratorExp() : AST_expr(AST_TYPE::GeneratorExp) {}
...@@ -620,8 +620,8 @@ class AST_Global : public AST_stmt { ...@@ -620,8 +620,8 @@ class AST_Global : public AST_stmt {
public: public:
std::vector<InternedString> names; std::vector<InternedString> names;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Global() : AST_stmt(AST_TYPE::Global) {} AST_Global() : AST_stmt(AST_TYPE::Global) {}
...@@ -633,8 +633,8 @@ public: ...@@ -633,8 +633,8 @@ public:
std::vector<AST_stmt*> body, orelse; std::vector<AST_stmt*> body, orelse;
AST_expr* test; AST_expr* test;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_If() : AST_stmt(AST_TYPE::If) {} AST_If() : AST_stmt(AST_TYPE::If) {}
...@@ -645,7 +645,7 @@ class AST_IfExp : public AST_expr { ...@@ -645,7 +645,7 @@ class AST_IfExp : public AST_expr {
public: public:
AST_expr* body, *test, *orelse; AST_expr* body, *test, *orelse;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_IfExp() : AST_expr(AST_TYPE::IfExp) {} AST_IfExp() : AST_expr(AST_TYPE::IfExp) {}
...@@ -656,8 +656,8 @@ class AST_Import : public AST_stmt { ...@@ -656,8 +656,8 @@ class AST_Import : public AST_stmt {
public: public:
std::vector<AST_alias*> names; std::vector<AST_alias*> names;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Import() : AST_stmt(AST_TYPE::Import) {} AST_Import() : AST_stmt(AST_TYPE::Import) {}
...@@ -670,8 +670,8 @@ public: ...@@ -670,8 +670,8 @@ public:
std::vector<AST_alias*> names; std::vector<AST_alias*> names;
int level; int level;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_ImportFrom() : AST_stmt(AST_TYPE::ImportFrom) {} AST_ImportFrom() : AST_stmt(AST_TYPE::ImportFrom) {}
...@@ -682,7 +682,7 @@ class AST_Index : public AST_slice { ...@@ -682,7 +682,7 @@ class AST_Index : public AST_slice {
public: public:
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Index() : AST_slice(AST_TYPE::Index) {} AST_Index() : AST_slice(AST_TYPE::Index) {}
...@@ -695,7 +695,7 @@ public: ...@@ -695,7 +695,7 @@ public:
AST_expr* value; AST_expr* value;
InternedString arg; InternedString arg;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_keyword() : AST(AST_TYPE::keyword) {} AST_keyword() : AST(AST_TYPE::keyword) {}
...@@ -707,7 +707,7 @@ public: ...@@ -707,7 +707,7 @@ public:
AST_arguments* args; AST_arguments* args;
AST_expr* body; AST_expr* body;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Lambda() : AST_expr(AST_TYPE::Lambda) {} AST_Lambda() : AST_expr(AST_TYPE::Lambda) {}
...@@ -719,7 +719,7 @@ public: ...@@ -719,7 +719,7 @@ public:
std::vector<AST_expr*> elts; std::vector<AST_expr*> elts;
AST_TYPE::AST_TYPE ctx_type; AST_TYPE::AST_TYPE ctx_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_List() : AST_expr(AST_TYPE::List) {} AST_List() : AST_expr(AST_TYPE::List) {}
...@@ -731,7 +731,7 @@ public: ...@@ -731,7 +731,7 @@ public:
std::vector<AST_comprehension*> generators; std::vector<AST_comprehension*> generators;
AST_expr* elt; AST_expr* elt;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_ListComp() : AST_expr(AST_TYPE::ListComp) {} AST_ListComp() : AST_expr(AST_TYPE::ListComp) {}
...@@ -745,7 +745,7 @@ public: ...@@ -745,7 +745,7 @@ public:
// no lineno, col_offset attributes // no lineno, col_offset attributes
std::vector<AST_stmt*> body; std::vector<AST_stmt*> body;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Module(std::unique_ptr<InternedStringPool> interned_strings) AST_Module(std::unique_ptr<InternedStringPool> interned_strings)
: AST(AST_TYPE::Module), interned_strings(std::move(interned_strings)) {} : AST(AST_TYPE::Module), interned_strings(std::move(interned_strings)) {}
...@@ -759,7 +759,7 @@ public: ...@@ -759,7 +759,7 @@ public:
std::vector<AST_stmt*> body; std::vector<AST_stmt*> body;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Suite(std::unique_ptr<InternedStringPool> interned_strings) AST_Suite(std::unique_ptr<InternedStringPool> interned_strings)
: AST(AST_TYPE::Suite), interned_strings(std::move(interned_strings)) {} : AST(AST_TYPE::Suite), interned_strings(std::move(interned_strings)) {}
...@@ -777,7 +777,7 @@ public: ...@@ -777,7 +777,7 @@ public:
// different bytecodes. // different bytecodes.
ScopeInfo::VarScopeType lookup_type; ScopeInfo::VarScopeType lookup_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Name(InternedString id, AST_TYPE::AST_TYPE ctx_type, int lineno, int col_offset = 0) AST_Name(InternedString id, AST_TYPE::AST_TYPE ctx_type, int lineno, int col_offset = 0)
: AST_expr(AST_TYPE::Name, lineno, col_offset), : AST_expr(AST_TYPE::Name, lineno, col_offset),
...@@ -806,7 +806,7 @@ public: ...@@ -806,7 +806,7 @@ public:
}; };
std::string n_long; std::string n_long;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Num() : AST_expr(AST_TYPE::Num) {} AST_Num() : AST_expr(AST_TYPE::Num) {}
...@@ -817,7 +817,7 @@ class AST_Repr : public AST_expr { ...@@ -817,7 +817,7 @@ class AST_Repr : public AST_expr {
public: public:
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Repr() : AST_expr(AST_TYPE::Repr) {} AST_Repr() : AST_expr(AST_TYPE::Repr) {}
...@@ -826,8 +826,8 @@ public: ...@@ -826,8 +826,8 @@ public:
class AST_Pass : public AST_stmt { class AST_Pass : public AST_stmt {
public: public:
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Pass() : AST_stmt(AST_TYPE::Pass) {} AST_Pass() : AST_stmt(AST_TYPE::Pass) {}
...@@ -840,8 +840,8 @@ public: ...@@ -840,8 +840,8 @@ public:
bool nl; bool nl;
std::vector<AST_expr*> values; std::vector<AST_expr*> values;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Print() : AST_stmt(AST_TYPE::Print) {} AST_Print() : AST_stmt(AST_TYPE::Print) {}
...@@ -856,8 +856,8 @@ public: ...@@ -856,8 +856,8 @@ public:
// Ie "raise Exception()" will have type==Exception(), inst==None, tback==None // Ie "raise Exception()" will have type==Exception(), inst==None, tback==None
AST_expr* arg0, *arg1, *arg2; AST_expr* arg0, *arg1, *arg2;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Raise() : AST_stmt(AST_TYPE::Raise), arg0(NULL), arg1(NULL), arg2(NULL) {} AST_Raise() : AST_stmt(AST_TYPE::Raise), arg0(NULL), arg1(NULL), arg2(NULL) {}
...@@ -868,8 +868,8 @@ class AST_Return : public AST_stmt { ...@@ -868,8 +868,8 @@ class AST_Return : public AST_stmt {
public: public:
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Return() : AST_stmt(AST_TYPE::Return) {} AST_Return() : AST_stmt(AST_TYPE::Return) {}
...@@ -880,7 +880,7 @@ class AST_Set : public AST_expr { ...@@ -880,7 +880,7 @@ class AST_Set : public AST_expr {
public: public:
std::vector<AST_expr*> elts; std::vector<AST_expr*> elts;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Set() : AST_expr(AST_TYPE::Set) {} AST_Set() : AST_expr(AST_TYPE::Set) {}
...@@ -892,7 +892,7 @@ public: ...@@ -892,7 +892,7 @@ public:
std::vector<AST_comprehension*> generators; std::vector<AST_comprehension*> generators;
AST_expr* elt; AST_expr* elt;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_SetComp() : AST_expr(AST_TYPE::SetComp) {} AST_SetComp() : AST_expr(AST_TYPE::SetComp) {}
...@@ -903,7 +903,7 @@ class AST_Slice : public AST_slice { ...@@ -903,7 +903,7 @@ class AST_Slice : public AST_slice {
public: public:
AST_expr* lower, *upper, *step; AST_expr* lower, *upper, *step;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Slice() : AST_slice(AST_TYPE::Slice) {} AST_Slice() : AST_slice(AST_TYPE::Slice) {}
...@@ -922,7 +922,7 @@ public: ...@@ -922,7 +922,7 @@ public:
// For UNICODE, it's the utf-8 encoded value. // For UNICODE, it's the utf-8 encoded value.
std::string str_data; std::string str_data;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Str() : AST_expr(AST_TYPE::Str), str_type(UNSET) {} AST_Str() : AST_expr(AST_TYPE::Str), str_type(UNSET) {}
AST_Str(std::string s) : AST_expr(AST_TYPE::Str), str_type(STR), str_data(std::move(s)) {} AST_Str(std::string s) : AST_expr(AST_TYPE::Str), str_type(STR), str_data(std::move(s)) {}
...@@ -936,7 +936,7 @@ public: ...@@ -936,7 +936,7 @@ public:
AST_slice* slice; AST_slice* slice;
AST_TYPE::AST_TYPE ctx_type; AST_TYPE::AST_TYPE ctx_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Subscript() : AST_expr(AST_TYPE::Subscript) {} AST_Subscript() : AST_expr(AST_TYPE::Subscript) {}
...@@ -948,8 +948,8 @@ public: ...@@ -948,8 +948,8 @@ public:
std::vector<AST_stmt*> body, orelse; std::vector<AST_stmt*> body, orelse;
std::vector<AST_ExceptHandler*> handlers; std::vector<AST_ExceptHandler*> handlers;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_TryExcept() : AST_stmt(AST_TYPE::TryExcept) {} AST_TryExcept() : AST_stmt(AST_TYPE::TryExcept) {}
...@@ -960,8 +960,8 @@ class AST_TryFinally : public AST_stmt { ...@@ -960,8 +960,8 @@ class AST_TryFinally : public AST_stmt {
public: public:
std::vector<AST_stmt*> body, finalbody; std::vector<AST_stmt*> body, finalbody;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_TryFinally() : AST_stmt(AST_TYPE::TryFinally) {} AST_TryFinally() : AST_stmt(AST_TYPE::TryFinally) {}
...@@ -973,7 +973,7 @@ public: ...@@ -973,7 +973,7 @@ public:
std::vector<AST_expr*> elts; std::vector<AST_expr*> elts;
AST_TYPE::AST_TYPE ctx_type; AST_TYPE::AST_TYPE ctx_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Tuple() : AST_expr(AST_TYPE::Tuple) {} AST_Tuple() : AST_expr(AST_TYPE::Tuple) {}
...@@ -985,7 +985,7 @@ public: ...@@ -985,7 +985,7 @@ public:
AST_expr* operand; AST_expr* operand;
AST_TYPE::AST_TYPE op_type; AST_TYPE::AST_TYPE op_type;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_UnaryOp() : AST_expr(AST_TYPE::UnaryOp) {} AST_UnaryOp() : AST_expr(AST_TYPE::UnaryOp) {}
...@@ -997,8 +997,8 @@ public: ...@@ -997,8 +997,8 @@ public:
AST_expr* test; AST_expr* test;
std::vector<AST_stmt*> body, orelse; std::vector<AST_stmt*> body, orelse;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_While() : AST_stmt(AST_TYPE::While) {} AST_While() : AST_stmt(AST_TYPE::While) {}
...@@ -1010,8 +1010,8 @@ public: ...@@ -1010,8 +1010,8 @@ public:
AST_expr* optional_vars, *context_expr; AST_expr* optional_vars, *context_expr;
std::vector<AST_stmt*> body; std::vector<AST_stmt*> body;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_With() : AST_stmt(AST_TYPE::With) {} AST_With() : AST_stmt(AST_TYPE::With) {}
...@@ -1022,7 +1022,7 @@ class AST_Yield : public AST_expr { ...@@ -1022,7 +1022,7 @@ class AST_Yield : public AST_expr {
public: public:
AST_expr* value; AST_expr* value;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_Yield() : AST_expr(AST_TYPE::Yield) {} AST_Yield() : AST_expr(AST_TYPE::Yield) {}
...@@ -1040,7 +1040,7 @@ public: ...@@ -1040,7 +1040,7 @@ public:
AST_expr* value; AST_expr* value;
InternedString attr; InternedString attr;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_ClsAttribute() : AST_expr(AST_TYPE::ClsAttribute) {} AST_ClsAttribute() : AST_expr(AST_TYPE::ClsAttribute) {}
...@@ -1053,8 +1053,8 @@ public: ...@@ -1053,8 +1053,8 @@ public:
CFGBlock* normal_dest, *exc_dest; CFGBlock* normal_dest, *exc_dest;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
virtual void accept_stmt(ASTStmtVisitor* v); virtual void accept_stmt(ASTStmtVisitor* v) override;
AST_Invoke(AST_stmt* stmt) : AST_stmt(AST_TYPE::Invoke), stmt(stmt) {} AST_Invoke(AST_stmt* stmt) : AST_stmt(AST_TYPE::Invoke), stmt(stmt) {}
...@@ -1084,7 +1084,7 @@ public: ...@@ -1084,7 +1084,7 @@ public:
} opcode; } opcode;
std::vector<AST_expr*> args; std::vector<AST_expr*> args;
virtual void accept(ASTVisitor* v); virtual void accept(ASTVisitor* v) override;
AST_LangPrimitive(Opcodes opcode) : AST_expr(AST_TYPE::LangPrimitive), opcode(opcode) {} AST_LangPrimitive(Opcodes opcode) : AST_expr(AST_TYPE::LangPrimitive), opcode(opcode) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment