aboutsummaryrefslogtreecommitdiff
path: root/find-modules/rules_engine.py
AgeCommit message (Collapse)Author
2021-07-13Fix typos found by codespellChristophe Giboudeaux
GIT_SILENT
2020-12-13Fix errors in python code, found by pylama in a strict CIDavid Faure
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2019-12-05EBN extra-cmake-modules comments spelling cleanupJohn Hayes
Summary: Correct spelling in extra-cmake-modules comments. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25752
2018-08-31Bindings: Make generator forward compatible with Python 3Stefan BrĂ¼ns
Summary: iteritems is no longer an available method for dict in Python 3. Using dict.items() is functionally identical, although it creates some overhead for Python 2.7 (creation of a temporary list). As this is only called when tracing, this is not a big issue. For Python 3, there is no overhead (dict.items() returns an iterator). Test Plan: Run python3 sip_generator.py ... Run python2 sip_generator.py ... Both generate the same code Reviewers: #frameworks, arojas Reviewed By: arojas Subscribers: arojas, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14912
2017-02-04Bindings: Add an end marker to the regex patternShaheed Haque
Fix the anchoring of the regular expression matching to cover the complete input. This was an oversight and should have no visible effects except that if new fields are added to a rule database, existing rules with wildcards will greedily match the new fields.
2017-01-31Bindings: Add missing documentation of the "name" for MethodCodeShaheed Haque
2017-01-31Update some documenation for the ModuleCodeDbShaheed Haque
2017-01-31Fix documentation for function databaseShaheed Haque
2017-01-31Remove some delimiters from the licence headerShaheed Haque
2017-01-21Bindings: Add missing rules to debug outputStephen Kelly
2017-01-15Bindings: Add a generic rule function to mark a container abstractStephen Kelly
2017-01-15Bindings: Fix handling of forward declarationsStephen Kelly
It is not appropriate to decorate each forward declaration with the SIP attribute /External/. That is only needed for forward declarations of types which are defined in a different module. Local forward declarations can be omitted from the sip code. In sip code, a forward declaration followed later by a full class definition is an error. Omit forward declarations unless they are decorated with the external attribute. Introduce a rules database for consumers to decorate them with the attribute as required.
2017-01-15Bindings: Use lists in function API instead of stringsStephen Kelly
Custom rules should be able to deal with lists in these cases. This is already the case for function parameters.
2017-01-13Bindings: Add rules engine for typedefsStephen Kelly
Currently this is rather simple, allowing only matching typedefs by name. If we need more later, we can extend the interface. This will make it possible to add bindings for the K18n framework.
2017-01-13Bindings: Implement ModuleCode and MethodCode databasesStephen Kelly
2017-01-05Bindings: Improve diagnostics for the rules engineShaheed Haque
Note which rule has a modification effect.
2017-01-05Bindings: Remove db member from RuleStephen Kelly
It is unused.
2017-01-05Bindings: Fix copy-pasta in documentationStephen Kelly
2016-10-31Add the rules_engine and sip_generatorShaheed Haque
These files process C++ headers with libclang and python-clang bindings, using the AST to generate SIP files for PyQt binding library generation. The design allows for further extensions which can process other artifacts found in headers. This iteration of the design is a simple minimum which suffices to generate headers for KItemModels and some other libraries.