triton
250825fd59
Reworked declaration storage in the managed AST layer.
...
Instead of keeping separate lists for different types of declarations, which limits future extensibility, provide a generalized declaration list like Clang. This also introduces a new DeclIterator<T> type to help migrating the rest of the codebase.
This is the first step of a progressive cleanup to modernize the AST/parser layer.
11 years ago
Dimitar Dobrev
4385ecac76
Fixed the finding of classes to also check name-spaces.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
11 years ago
Elias Holzer
933df5e65a
Improved support in parser for template classes and functions.
...
* Use clangIndex to identify declarations across translation units.
* Added new Find*ByUSR methods and removed unused Find*(IntPtr) methods.
* Added Depth/Index and IsParameterPack fields to TemplateParameterType.
* Fixed member initialization issues in C++ Method class.
* Added AST tests for function and class templates.
* All tests pass with new and old parser.
11 years ago
Elias Holzer
3f813bc3ee
Fixed line endings.
11 years ago
Elias Holzer
23a0fc2339
Fixed a null pointer exception when parsing files with unnamed enums.
11 years ago
Elias Holzer
c2bfdcc1a6
Helper method FindEnumWithItem will look into namespaces and classes too now.
11 years ago
Elias Holzer
61a5ceb5c3
Added copy constructors to Class, Parameter and DeclarationContext.
11 years ago
Elias Holzer
c670148493
The FindTypedef method supports full type names now.
11 years ago
Elias Holzer
487189ebad
Fixed the FindOperator method for classes.
...
Added AST test case and fixed line endings (LF).
11 years ago
marcos henrich
3f96bdbfe3
Replaced declaration IgnoreFlags by GenerationKind. Added methods IsInternal and IsDeclared to declaration. Replaced IsGenerated = true by GeneratioKind = GeneratioKind.Internal. Deprecated Ignore, replace Ignore set by ExplicityIgnored, replace Ignore get by IsGenerated, IsInternal or IsDeclared.
...
Conflicts:
src/Generator/Passes/CheckOperatorsOverloads.cs
11 years ago
Tom Spilman
f6aaa7400b
Checking for null like FindClass().
11 years ago
Tom Spilman
2027212e85
Fixed FindFunction() to search namespaces.
11 years ago
Elias Holzer
1b541ade5f
Helper method DeclarationContext.FindClass supports nested classes now.
11 years ago
triton
440632896f
Added support for logical names to the declarations.
...
While at it, I also refactored the logic of Qualified name properties. Now instead of recursion it will gather all the used namespaces and filter them.
11 years ago
triton
ee3fbd8e03
Added support for anonymous C++11 inline namespaces to the AST and parsers.
11 years ago
triton
7faa50d945
Fixed native symbol naming.
...
We now properly name the internal ctor declarations by constructor type.
We also now keep an index for each function that is used to unique their native name.
11 years ago
Dimitar Dobrev
11ef53df10
Generated all internals of all (including ignored) classes and all of their fields in order to properly store objects in managed code.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
3209f1a398
Fixed a possible crash in the finding of classes by name.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
d56affd117
Fixed the finding of classes to only return complete declarations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Joao Matos
19376cc2c3
Added support for keeping track of extern "C" contexts in classes/structs.
12 years ago
triton
4ccb60a553
Fixed FindOperator code to actually compile.
12 years ago
triton
ec8d33d3cb
Fixed GetFunctionOverloads to work for class operators too.
12 years ago
triton
a4deeab18f
Fixed GetFunctionOverloads to work for all operator kinds.
...
This indirectly fixes the pass for ambiguity to process property indexers correctly.
12 years ago
triton
a754b46438
Reworked function template parsing.
...
The previous version did not handle methods properly and lead to duplicate definitions since it did not check for existing templates with the same signature.
12 years ago
triton
c979342ea6
Moved the TranslationUnit property from DeclarationContext to Declaration.
12 years ago
Dimitar Dobrev
0c7a463740
Extended the searching for classes to check nested classes as well.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
3cf6c7b3f1
Added a test for the pass that moves functions to a class.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
Dimitar Dobrev
1473488289
Added a pass to move functions to an appropriate existing class if possible.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
f1755f6d46
Reworked template parsing with support for specializations and partial specializations.
...
Fixes #121 .
12 years ago
triton
b91ac99576
Reworked the CLI type references collector and generation code.
...
We now properly handle type references to namespaces that do not exist in the referencing translation unit. We do this by collecting all the references for all namespaces in the translation unit and generate a block with all the forward references.
12 years ago
Dimitar Dobrev
813084948f
Fixed the resolution of overloads for conversion operators.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
12 years ago
triton
2ae4f02edd
Check for typedefs in HasDeclarations.
12 years ago
triton
cd08295499
Use a map to keep track of anonymous declarations else we cannot refer to them later when needed.
...
This could lead to self-referencing problems when parsing (and stack overflows!).
12 years ago
marcos henrich
2ea69f1a67
Added return null to method FindClass when parameter class name is null or empty
12 years ago
triton
68ddfbdd6f
Move the AST project to the CppSharp.AST namespace.
12 years ago
triton
c488dcbfde
Prefix all the libraries and project names with CppSharp.
12 years ago
triton
a19381df38
Fixed FindClass to work with qualified names.
12 years ago
triton
95418f79ab
Fixed FindEnum to work with qualified names.
12 years ago
triton
cf002fb007
FindNamespace now takes an IEnumerable instead of array.
12 years ago
triton
e57c435426
Fixed some incorrect behavior with nested types in the CheckAmbiguousOverloads pass by fixing GetFunctionOverloads to be dynamically dispatched instead of using some weird manual type checking.
12 years ago
triton
e1ac13601c
Added a new abstract class DeclarationContext that acts as a container for declarations and make Class and Namespace inherit from it.
12 years ago
triton
cc8f7cd1db
Renamed Cxxi references to CppSharp.
12 years ago
triton
09b26a691f
Provide an helper method to get the overloads of a function.
12 years ago
triton
f424575db5
Moved namespace splitting code to the canonical FindClass method.
12 years ago
triton
9f029047ad
Added parsing, AST and visitor stubs support for (class static) variables.
12 years ago
triton
3c07a324a8
Improved the logic for checking for (nested/qualified) namespaces.
12 years ago
triton
70eeebb9f1
Remove the redundant Parent property of the namespace and just use the Namespace property from the declaration.
13 years ago
triton
e9129ed27f
Reworked the declaration ignore system so we can still process declarations as part of type maps even if they do not have mirror classes generated.
13 years ago
triton
08f95fc509
Do not create a class declaration if one is not found.
13 years ago
triton
b8ebd27841
Added namespace walk support.
13 years ago