Changeset View
Changeset View
Standalone View
Standalone View
kdev-pg/kdev-pg-default-visitor-gen.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 31 | { | |||
---|---|---|---|---|---|
42 | out << "};" << endl; | 42 | out << "};" << endl; | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | void GenerateDefaultVisitorRule::operator()(QPair<QString,Model::SymbolItem*> const &__it) | 45 | void GenerateDefaultVisitorRule::operator()(QPair<QString,Model::SymbolItem*> const &__it) | ||
46 | { | 46 | { | ||
47 | Model::SymbolItem *sym = __it.second; | 47 | Model::SymbolItem *sym = __it.second; | ||
48 | 48 | | |||
49 | #define O(name) \ | 49 | #define O(name) \ | ||
50 | out << "virtual void visit" << name << "(" << name << "Ast *node);" << endl; | 50 | out << "void visit" << name << "(" << name << "Ast *node) override;" << endl; | ||
51 | 51 | | |||
52 | if(isOperatorSymbol(sym)) | 52 | if(isOperatorSymbol(sym)) | ||
53 | { | 53 | { | ||
54 | O("Prefix" + sym->mCapitalizedName) | 54 | O("Prefix" + sym->mCapitalizedName) | ||
55 | O("Postfix" + sym->mCapitalizedName) | 55 | O("Postfix" + sym->mCapitalizedName) | ||
56 | O("Binary" + sym->mCapitalizedName) | 56 | O("Binary" + sym->mCapitalizedName) | ||
57 | O("Ternary" + sym->mCapitalizedName) | 57 | O("Ternary" + sym->mCapitalizedName) | ||
58 | } | 58 | } | ||
59 | else | 59 | else | ||
60 | O(sym->mCapitalizedName) | 60 | O(sym->mCapitalizedName) | ||
61 | 61 | | |||
62 | #undef O | 62 | #undef O | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | } | 65 | } |