-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Attr, Decl, Expr, Stmt, and Type types for the full set of exp…
…osed kinds
- Loading branch information
1 parent
08c7c2d
commit 24e590d
Showing
365 changed files
with
3,152 additions
and
1,529 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using System; | ||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public class InheritableAttr : Attr | ||
{ | ||
internal InheritableAttr(CXCursor handle, CXCursorKind expectedKind) : base(handle, expectedKind) | ||
internal InheritableAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AttrKind_LastInheritableAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AttrKind_FirstInheritableAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using System; | ||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class InheritableParamAttr : InheritableAttr | ||
public class InheritableParamAttr : InheritableAttr | ||
{ | ||
internal InheritableParamAttr(CXCursor handle, CXCursorKind expectedKind) : base(handle, expectedKind) | ||
internal InheritableParamAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AttrKind_LastInheritableParamAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AttrKind_FirstInheritableParamAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using System; | ||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class ParameterABIAttr : InheritableParamAttr | ||
{ | ||
internal ParameterABIAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AttrKind_LastParameterABIAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AttrKind_FirstParameterABIAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using System; | ||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class StmtAttr : Attr | ||
{ | ||
internal StmtAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AttrKind_LastStmtAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AttrKind_FirstStmtAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using System; | ||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class TypeAttr : Attr | ||
{ | ||
internal TypeAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AttrKind_LastTypeAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AttrKind_FirstTypeAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class BindingDecl : ValueDecl | ||
{ | ||
internal BindingDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_Binding) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class BlockDecl : Decl, IDeclContext | ||
{ | ||
private readonly Lazy<IReadOnlyList<Decl>> _decls; | ||
|
||
internal BlockDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_Block) | ||
{ | ||
_decls = new Lazy<IReadOnlyList<Decl>>(() => CursorChildren.OfType<Decl>().ToList()); | ||
} | ||
|
||
public IReadOnlyList<Decl> Decls => _decls.Value; | ||
|
||
public IDeclContext LexicalParent => LexicalDeclContext; | ||
|
||
public IDeclContext Parent => DeclContext; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class BuiltinTemplateDecl : TemplateDecl | ||
{ | ||
internal BuiltinTemplateDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_BuiltinTemplate) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class CXXDeductionGuideDecl : FunctionDecl | ||
{ | ||
internal CXXDeductionGuideDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_CXXDeductionGuide) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class CapturedDecl : Decl, IDeclContext | ||
{ | ||
private readonly Lazy<IReadOnlyList<Decl>> _decls; | ||
|
||
internal CapturedDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_Captured) | ||
{ | ||
_decls = new Lazy<IReadOnlyList<Decl>>(() => CursorChildren.OfType<Decl>().ToList()); | ||
} | ||
|
||
public IReadOnlyList<Decl> Decls => _decls.Value; | ||
|
||
public IDeclContext LexicalParent => LexicalDeclContext; | ||
|
||
public IDeclContext Parent => DeclContext; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
sources/ClangSharp/Cursors/Decls/ClassScopeFunctionSpecializationDecl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class ClassScopeFunctionSpecializationDecl : Decl | ||
{ | ||
internal ClassScopeFunctionSpecializationDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_ClassScopeFunctionSpecialization) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class ConceptDecl : TemplateDecl, IMergeable<ConceptDecl> | ||
{ | ||
internal ConceptDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_Concept) | ||
{ | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
sources/ClangSharp/Cursors/Decls/ConstructorUsingShadowDecl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) Microsoft and Contributors. All rights reserved. Licensed under the University of Illinois/NCSA Open Source License. See LICENSE.txt in the project root for license information. | ||
|
||
using ClangSharp.Interop; | ||
|
||
namespace ClangSharp | ||
{ | ||
public sealed class ConstructorUsingShadowDecl : UsingShadowDecl | ||
{ | ||
internal ConstructorUsingShadowDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_UnexposedDecl, CX_DeclKind.CX_DeclKind_ConstructorUsingShadow) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.