-
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, and Expr types for the full set of exposed kinds
- Loading branch information
1 parent
4479bc0
commit 697d136
Showing
318 changed files
with
3,228 additions
and
918 deletions.
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
sources/ClangSharp/Cursors/Attrs/InheritableAttrs/InheritableAttr.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,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) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AK_LastInheritableAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AK_FirstInheritableAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...s/ClangSharp/Cursors/Attrs/InheritableAttrs/InheritableParamAttrs/InheritableParamAttr.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,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 InheritableParamAttr : InheritableAttr | ||
{ | ||
internal InheritableParamAttr(CXCursor handle) : base(handle) | ||
{ | ||
if ((CX_AttrKind.CX_AK_LastInheritableParamAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AK_FirstInheritableParamAttr)) | ||
{ | ||
throw new ArgumentException(nameof(handle)); | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
sources/ClangSharp/Cursors/Attrs/InheritableAttrs/InheritableParamAttrs/ParameterABIAttr.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,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_AK_LastParameterABIAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AK_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_AK_LastStmtAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AK_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_AK_LastTypeAttr < handle.AttrKind) || (handle.AttrKind < CX_AttrKind.CX_AK_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
8 changes: 4 additions & 4 deletions
8
...gSharp/Cursors/Decls/ObjCContainerDecl.cs → ...ces/ClangSharp/Cursors/Decls/BlockDecl.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
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_DK_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_DK_ClassScopeFunctionSpecialization) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.