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

List:       kde-commits
Subject:    playground/devtools/kdevelop4-extra-plugins/ruby/duchain
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2010-03-01 0:25:04
Message-ID: 1267403104.542179.24770.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1097358 by dymo:

Use custom "Object" type for all Ruby function arguments and return types.
It's more correct to use "Object" rather than "mixed" as in Ruby everything is \
"Object" after all.


 M  +2 -0      CMakeLists.txt  
 M  +4 -4      typebuilder.cpp  
 A             types (directory)  
 A             types/objecttype.cpp   [License: LGPL (v2+)]
 A             types/objecttype.h   [License: LGPL (v2+)]


--- trunk/playground/devtools/kdevelop4-extra-plugins/ruby/duchain/CMakeLists.txt \
#1097357:1097358 @@ -5,6 +5,8 @@
     declarationbuilder.cpp
     contextbuilder.cpp
     typebuilder.cpp
+
+    types/objecttype.cpp
 )
 
 kde4_add_library(kdevrubyduchain SHARED ${rubyduchain_SRCS})
--- trunk/playground/devtools/kdevelop4-extra-plugins/ruby/duchain/typebuilder.cpp \
#1097357:1097358 @@ -20,10 +20,8 @@
 */
 #include "typebuilder.h"
 
-#include <language/duchain/types/unsuretype.h>
-#include <language/duchain/types/structuretype.h>
 #include <language/duchain/types/functiontype.h>
-#include <language/duchain/types/integraltype.h>
+#include "duchain/types/objecttype.h"
 
 namespace Ruby  {
 
@@ -44,6 +42,8 @@
 {
     KDevelop::FunctionType::Ptr functionType = KDevelop::FunctionType::Ptr(new \
KDevelop::FunctionType());  openType(functionType);
+    KDevelop::AbstractType::Ptr returnType(new ObjectType());
+    functionType->setReturnType(returnType);
 
     TypeBuilderBase::visitFunction(ast);
     updateCurrentType();
@@ -53,7 +53,7 @@
 
 void TypeBuilder::visitFunctionArgument(FunctionArgumentAST* ast)
 {
-    KDevelop::AbstractType::Ptr type(new \
KDevelop::IntegralType(KDevelop::IntegralType::TypeMixed)); +    \
KDevelop::AbstractType::Ptr type(new ObjectType());  openAbstractType(type);
     TypeBuilderBase::visitFunctionArgument(ast);
     closeType();


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

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