In file included from main.cpp:28:0:
fixed_allocator.h:4:41: error: expected class-name before '{' token
class FormatVisitor: public BaseVisitor {
^
fixed_allocator.h:6:22: error: 'BaseNode' does not name a type
void Visit(const BaseNode* node) override {
^~~~~~~~
fixed_allocator.h:10:22: error: 'ClassDeclarationNode' does not name a type
void Visit(const ClassDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~~~
fixed_allocator.h:10:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const ClassDeclarationNode* node) override {
^~~~~
fixed_allocator.h:6:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
fixed_allocator.h:46:22: error: 'VarDeclarationNode' does not name a type
void Visit(const VarDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~
fixed_allocator.h:46:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const VarDeclarationNode* node) override {
^~~~~
fixed_allocator.h:6:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
fixed_allocator.h:55:22: error: 'MethodDeclarationNode' does not name a type
void Visit(const MethodDeclarationNode* node) override {
^~~~~~~~~~~~~~~~~~~~~
fixed_allocator.h:55:10: error: 'void FormatVisitor::Visit(const int*)' cannot be overloaded
void Visit(const MethodDeclarationNode* node) override {
^~~~~
fixed_allocator.h:6:10: error: with 'void FormatVisitor::Visit(const int*)'
void Visit(const BaseNode* node) override {
^~~~~
fixed_allocator.h:6:10: error: 'void FormatVisitor::Visit(const int*)' marked 'override', but does not override
fixed_allocator.h: In member function 'void FormatVisitor::Visit(const int*)':
fixed_allocator.h:7:15: error: request for member 'Visit' in '* node', which is of non-class type 'const int'
node->Visit(this);
^~~~~
fixed_allocator.h: In member function 'void FormatVisitor::Visit(const int*)':
fixed_allocator.h:11:49: error: request for member 'ClassName' in '* node', which is of non-class type 'const int'
result.push_back(ccc + "class " + node->ClassName() + " {");
^~~~~~~~~
fixed_allocator.h:12:21: error: 'BaseNode' was not declared in this scope
std::vector<BaseNode*> pubFi = node->PublicFields();
^~~~~~~~
fixed_allocator.h:12:30: error: template argument 1 is invalid
std::vector<BaseNode*> pubFi = node->PublicFields();
^
fixed_allocator.h:12:30: error: template argument 2 is invalid
fixed_allocator.h:12:46: error: request for member 'PublicFields' in '* node', which is of non-class type 'const int'
std::vector<BaseNode*> pubFi = node->PublicFields();
^~~~~~~~~~~~
fixed_allocator.h:13:20: error: request for member 'empty' in 'pubFi', which is of non-class type 'int'
if (!pubFi.empty()) {
^~~~~
fixed_allocator.h:15:26: error: request for member 'begin' in 'pubFi', which is of non-class type 'int'
auto i = pubFi.begin();
^~~~~
fixed_allocator.h:16:29: error: request for member 'end' in 'pubFi', which is of non-class type 'int'
while (i != pubFi.end()) {
^~~
fixed_allocator.h:21:30: error: template argument 1 is invalid
std::vector<BaseNode*> proFi = node->ProtectedFields();
^
fixed_allocator.h:21:30: error: template argument 2 is invalid
fixed_allocator.h:21:46: error: request for member 'ProtectedFields' in '* node', which is of non-class type 'const int'
std::vector<BaseNode*> proFi = node->ProtectedFields();
^~~~~~~~~~~~~~~
fixed_allocator.h:22:20: error: request for member 'empty' in 'proFi', which is of non-class type 'int'
if (!proFi.empty()) {
^~~~~
fixed_allocator.h:25:26: error: request for member 'begin' in 'proFi', which is of non-class type 'int'
auto i = proFi.begin();
^~~~~
fixed_allocator.h:26:29: error: request for member 'end' in 'proFi', which is of non-class type 'int'
while (i != proFi.end()) {
^~~
fixed_allocator.h:31:30: error: template argument 1 is invalid
std::vector<BaseNode*> privaFi = node->PrivateFields();
^
fixed_allocator.h:31:30: error: template argument 2 is invalid
fixed_allocator.h:31:48: error: request for member 'PrivateFields' in '* node', which is of non-class type 'const int'
std::vector<BaseNode*> privaFi = node->PrivateFields();
^~~~~~~~~~~~~
fixed_allocator.h:32:22: error: request for member 'empty' in 'privaFi', which is of non-class type 'int'
if (!privaFi.empty()) {
^~~~~
fixed_allocator.h:35:28: error: request for member 'begin' in 'privaFi', which is of non-class type 'int'
auto i = privaFi.begin();
^~~~~
fixed_allocator.h:36:31: error: request for member 'end' in 'privaFi', which is of non-class type 'int'
while (i != privaFi.end()) {
^~~
fixed_allocator.h: In member function 'void FormatVisitor::Visit(const int*)':
fixed_allocator.h:48:22: error: request for member 'TypeName' in '* node', which is of non-class type 'const int'
sss += node->TypeName() + ' ' + node->VarName();
^~~~~~~~
fixed_allocator.h:48:47: error: request for member 'VarName' in '* node', which is of non-class type 'const int'
sss += node->TypeName() + ' ' + node->VarName();
^~~~~~~
fixed_allocator.h:50:32: error: request for member 'TypeName' in '* node', which is of non-class type 'const int'
sss = " " + node->TypeName() + ' ' + node->VarName() + ";";
^~~~~~~~
fixed_allocator.h:50:57: error: request for member 'VarName' in '* node', which is of non-class type 'const int'
sss = " " + node->TypeName() + ' ' + node->VarName() + ";";
^~~~~~~
fixed_allocator.h: In member function 'void FormatVisitor::Visit(const int*)':
fixed_allocator.h:56:36: error: request for member 'ReturnTypeName' in '* node', which is of non-class type 'const int'
sss = ccc + " " + node->ReturnTypeName();
^~~~~~~~~~~~~~
fixed_allocator.h:57:28: error: request for member 'MethodName' in '* node', which is of non-class type 'const int'
sss += ' ' + node->MethodName() + '(';
^~~~~~~~~~
fixed_allocator.h:58:21: error: 'BaseNode' was not declared in this scope
std::vector<BaseNode*> args = node->Arguments();
^~~~~~~~
fixed_allocator.h:58:30: error: template argument 1 is invalid
std::vector<BaseNode*> args = node->Arguments();
^
fixed_allocator.h:58:30: error: template argument 2 is invalid
fixed_allocator.h:58:45: error: request for member 'Arguments' in '* node', which is of non-class type 'const int'
std::vector<BaseNode*> args = node->Arguments();
^~~~~~~~~
fixed_allocator.h:59:23: error: request for member 'begin' in 'args', which is of non-class type 'int'
auto i = args.begin();
^~~~~
fixed_allocator.h:60:26: error: request for member 'end' in 'args', which is of non-class type 'int'
while (i != args.end()) {
^~~
fixed_allocator.h:61:25: error: request for member 'begin' in 'args', which is of non-class type 'int'
if (i != args.begin()) {
^~~~~
main.cpp: In function 'int main()':
main.cpp:44:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<int> a(1);
^~~~~~~~~~~~~~
main.cpp:44:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<int> a(1);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:44:24: error: expected primary-expression before 'int'
FixedAllocator<int> a(1);
^~~
main.cpp:45:19: error: 'a' was not declared in this scope
auto p1 = a.Allocate();
^
main.cpp:55:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(10);
^~~~~~~~~~~~~~
main.cpp:55:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(10);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:55:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(10);
^
main.cpp:55:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(10);
^
main.cpp:62:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
main.cpp:62:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:62:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(100);
^
main.cpp:62:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(100);
^
main.cpp:69:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(1);
^~~~~~~~~~~~~~
main.cpp:69:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(1);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:69:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(1);
^
main.cpp:69:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(1);
^
main.cpp:76:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(1);
^~~~~~~~~~~~~~
main.cpp:76:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(1);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:76:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(1);
^
main.cpp:76:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(1);
^
main.cpp:86:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
main.cpp:86:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:86:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(100);
^
main.cpp:86:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(100);
^
main.cpp:96:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
main.cpp:96:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(100);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:96:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(100);
^
main.cpp:96:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(100);
^
main.cpp:106:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<std::string> a(1000000);
^~~~~~~~~~~~~~
main.cpp:106:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<std::string> a(1000000);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:106:35: error: expected primary-expression before '>' token
FixedAllocator<std::string> a(1000000);
^
main.cpp:106:37: error: 'a' was not declared in this scope
FixedAllocator<std::string> a(1000000);
^
main.cpp:116:9: error: 'FixedAllocator' was not declared in this scope
FixedAllocator<char> a(100);
^~~~~~~~~~~~~~
main.cpp:116:9: note: suggested alternative: 'PageAllocator'
FixedAllocator<char> a(100);
^~~~~~~~~~~~~~
PageAllocator
main.cpp:116:24: error: expected primary-expression before 'char'
FixedAllocator<char> a(100);
^~~~
main.cpp:119:29: error: 'a' was not declared in this scope
store.push_back(a.Allocate());
^
main.cpp:123:13: error: 'a' was not declared in this scope
a.Deallocate(store[rnd]);
^
|