Changeset View
Changeset View
Standalone View
Standalone View
duchain/helper.cpp
Show All 24 Lines | |||||
25 | #include <language/duchain/ducontext.h> | 25 | #include <language/duchain/ducontext.h> | ||
26 | #include <language/duchain/duchainlock.h> | 26 | #include <language/duchain/duchainlock.h> | ||
27 | #include <language/duchain/persistentsymboltable.h> | 27 | #include <language/duchain/persistentsymboltable.h> | ||
28 | #include <language/duchain/duchain.h> | 28 | #include <language/duchain/duchain.h> | ||
29 | #include <language/duchain/stringhelpers.h> | 29 | #include <language/duchain/stringhelpers.h> | ||
30 | #include <language/duchain/parsingenvironment.h> | 30 | #include <language/duchain/parsingenvironment.h> | ||
31 | #include <language/duchain/types/unsuretype.h> | 31 | #include <language/duchain/types/unsuretype.h> | ||
32 | #include <language/duchain/types/integraltype.h> | 32 | #include <language/duchain/types/integraltype.h> | ||
33 | #include <language/duchain/types/arraytype.h> | ||||
33 | #include <interfaces/icore.h> | 34 | #include <interfaces/icore.h> | ||
34 | #include <interfaces/iprojectcontroller.h> | 35 | #include <interfaces/iprojectcontroller.h> | ||
35 | #include <interfaces/iuicontroller.h> | 36 | #include <interfaces/iuicontroller.h> | ||
36 | #include <interfaces/iproject.h> | 37 | #include <interfaces/iproject.h> | ||
37 | #include <project/projectmodel.h> | 38 | #include <project/projectmodel.h> | ||
38 | #include <util/path.h> | 39 | #include <util/path.h> | ||
39 | 40 | | |||
40 | #include "editorintegrator.h" | 41 | #include "editorintegrator.h" | ||
41 | #include "../parser/parsesession.h" | 42 | #include "../parser/parsesession.h" | ||
42 | #include "phpast.h" | 43 | #include "phpast.h" | ||
43 | #include "phpdefaultvisitor.h" | 44 | #include "phpdefaultvisitor.h" | ||
44 | #include "declarations/classdeclaration.h" | 45 | #include "declarations/classdeclaration.h" | ||
45 | #include "declarations/classmethoddeclaration.h" | 46 | #include "declarations/classmethoddeclaration.h" | ||
46 | #include "declarations/functiondeclaration.h" | 47 | #include "declarations/functiondeclaration.h" | ||
47 | #include "types/indexedcontainer.h" | | |||
48 | #include "types/integraltypeextended.h" | 48 | #include "types/integraltypeextended.h" | ||
49 | #include "expressionparser.h" | 49 | #include "expressionparser.h" | ||
50 | #include "expressionvisitor.h" | 50 | #include "expressionvisitor.h" | ||
51 | 51 | | |||
52 | #include "duchaindebug.h" | 52 | #include "duchaindebug.h" | ||
53 | 53 | | |||
54 | #define ifDebug(x) | 54 | #define ifDebug(x) | ||
55 | 55 | | |||
▲ Show 20 Lines • Show All 509 Lines • ▼ Show 20 Line(s) | 523 | { | |||
565 | if ( node->isRef != -1 ) { | 565 | if ( node->isRef != -1 ) { | ||
566 | ReferenceType::Ptr p( new ReferenceType() ); | 566 | ReferenceType::Ptr p( new ReferenceType() ); | ||
567 | p->setBaseType( type ); | 567 | p->setBaseType( type ); | ||
568 | 568 | | |||
569 | type = p.cast<AbstractType>(); | 569 | type = p.cast<AbstractType>(); | ||
570 | } | 570 | } | ||
571 | 571 | | |||
572 | if (node->isVariadic != -1) { | 572 | if (node->isVariadic != -1) { | ||
573 | auto *container = new IndexedContainer(); | 573 | auto *container = new KDevelop::ArrayType(); | ||
574 | container->addEntry(type); | 574 | container->setElementType(type); | ||
575 | container->setPrettyName(IndexedString("array")); | | |||
576 | type = AbstractType::Ptr(container); | 575 | type = AbstractType::Ptr(container); | ||
577 | } | 576 | } | ||
578 | 577 | | |||
579 | Q_ASSERT(type); | 578 | Q_ASSERT(type); | ||
580 | return type; | 579 | return type; | ||
581 | } | 580 | } | ||
582 | 581 | | |||
583 | AbstractType::Ptr returnType(const ReturnTypeAst* node, AbstractType::Ptr phpDocTypehint, EditorIntegrator* editor, DUContext* currentContext) { | 582 | AbstractType::Ptr returnType(const ReturnTypeAst* node, AbstractType::Ptr phpDocTypehint, EditorIntegrator* editor, DUContext* currentContext) { | ||
Show All 15 Lines |