Changeset View
Changeset View
Standalone View
Standalone View
duchain/expressionvisitor.h
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 55 | public: | |||
---|---|---|---|---|---|
75 | virtual void visitTuple(TupleAst* node); | 75 | virtual void visitTuple(TupleAst* node); | ||
76 | virtual void visitListComprehension(ListComprehensionAst* node); | 76 | virtual void visitListComprehension(ListComprehensionAst* node); | ||
77 | virtual void visitDictionaryComprehension(DictionaryComprehensionAst* node); | 77 | virtual void visitDictionaryComprehension(DictionaryComprehensionAst* node); | ||
78 | virtual void visitSetComprehension(SetComprehensionAst* node); | 78 | virtual void visitSetComprehension(SetComprehensionAst* node); | ||
79 | virtual void visitIfExpression(IfExpressionAst* node); | 79 | virtual void visitIfExpression(IfExpressionAst* node); | ||
80 | virtual void visitNameConstant(NameConstantAst* node); | 80 | virtual void visitNameConstant(NameConstantAst* node); | ||
81 | 81 | | |||
82 | /** | 82 | /** | ||
83 | * @brief Checks the decorators of the given function declaration. | 83 | * @brief Checks for magic docstrings that override a call's return type. | ||
84 | * | 84 | * | ||
85 | * @param node The node to visit | 85 | * @param node The node to visit. | ||
86 | * @param funcDecl The call's function declaration, if any | 86 | * @param normalType The return type as determined without docstrings. | ||
87 | * @param classDecl The call's class declaration, if any | 87 | * @param docstring Docstring of the function. | ||
88 | * @param isConstructor whether a constructor is being called | | |||
89 | */ | 88 | */ | ||
90 | void checkForDecorators(CallAst* node, Python::FunctionDeclaration* funcDecl, | 89 | AbstractType::Ptr docstringTypeOverride(CallAst* node, const AbstractType::Ptr normalType, | ||
91 | Python::ClassDeclaration* classDecl, bool isConstructor); | 90 | const QString& docstring); | ||
92 | 91 | | |||
93 | bool isAlias() const { | 92 | bool isAlias() const { | ||
94 | return m_isAlias; | 93 | return m_isAlias; | ||
95 | } | 94 | } | ||
96 | 95 | | |||
97 | void enableGlobalSearching() { | 96 | void enableGlobalSearching() { | ||
98 | m_forceGlobalSearching = true; | 97 | m_forceGlobalSearching = true; | ||
99 | } | 98 | } | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |