[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/bindings/smokegenerator
From:       Arno Rehn <kde () arnorehn ! de>
Date:       2009-07-05 9:47:44
Message-ID: 1246787264.005815.1147.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 991540 by arnorehn:

care about inline methods


 M  +27 -2     generatorvisitor.cpp  


--- trunk/playground/bindings/smokegenerator/generatorvisitor.cpp #991539:991540
@@ -332,9 +332,34 @@
 //     DefaultVisitor::visitEnumerator(node);
 }
 
-void GeneratorVisitor::visitFunctionDefinition(FunctionDefinitionAST* )
+void GeneratorVisitor::visitFunctionDefinition(FunctionDefinitionAST* node)
 {
-    return;
+    visit(node->type_specifier);
+    if (node->function_specifiers) {
+        const ListNode<std::size_t> *it = node->function_specifiers->toFront(), *end = it;
+        do {
+            if (it->element && m_session->token_stream->kind(it->element) == Token_virtual) {
+                // found virtual token
+                isVirtual = true;
+                break;
+            }
+            it = it->next;
+        } while (end != it);
+    }
+    if (node->storage_specifiers) {
+        const ListNode<std::size_t> *it = node->storage_specifiers->toFront(), *end = it;
+        do {
+            if (it->element && m_session->token_stream->kind(it->element) == Token_static) {
+                isStatic = true;
+            } else if (it->element && m_session->token_stream->kind(it->element) == Token_friend) {
+                // we're not interested in who's the friend of whom ;)
+                return;
+            }
+            it = it->next;
+        } while (end != it);
+    }
+    visit(node->init_declarator);
+    isStatic = isVirtual = hasInitializer = false;
 }
 
 void GeneratorVisitor::visitInitializerClause(InitializerClauseAST *)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic