-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to tree-sitter v0.25.2 (#5)
- Loading branch information
1 parent
2fa3a24
commit 368f5db
Showing
29 changed files
with
302 additions
and
22 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
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
Binary file modified
BIN
+0 Bytes
(100%)
packages-definitions/libtreesitter.runtime.linux-x64/libtree-sitter-embedded-template.so
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
packages-definitions/libtreesitter.runtime.linux-x64/libtree-sitter-html.so
Binary file not shown.
Binary file modified
BIN
+88 Bytes
(100%)
packages-definitions/libtreesitter.runtime.linux-x64/libtree-sitter-json.so
Binary file not shown.
Binary file modified
BIN
+7.36 KB
(100%)
packages-definitions/libtreesitter.runtime.linux-x64/libtree-sitter-ruby.so
Binary file not shown.
Binary file modified
BIN
+18.2 KB
(110%)
packages-definitions/libtreesitter.runtime.linux-x64/libtree-sitter.so
Binary file not shown.
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
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 @@ | ||
namespace TreeSitter.Bindings; | ||
|
||
public partial struct TSLanguageMetadata | ||
{ | ||
[NativeTypeName("uint8_t")] | ||
public byte major_version; | ||
|
||
[NativeTypeName("uint8_t")] | ||
public byte minor_version; | ||
|
||
[NativeTypeName("uint8_t")] | ||
public byte patch_version; | ||
} |
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,9 @@ | ||
namespace TreeSitter.Bindings; | ||
|
||
public unsafe partial struct TSParseOptions | ||
{ | ||
public void* payload; | ||
|
||
[NativeTypeName("bool (*)(TSParseState *)")] | ||
public delegate* unmanaged[Cdecl]<TSParseState*, byte> progress_callback; | ||
} |
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,12 @@ | ||
namespace TreeSitter.Bindings; | ||
|
||
public unsafe partial struct TSParseState | ||
{ | ||
public void* payload; | ||
|
||
[NativeTypeName("uint32_t")] | ||
public uint current_byte_offset; | ||
|
||
[NativeTypeName("bool")] | ||
public byte has_error; | ||
} |
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,9 @@ | ||
namespace TreeSitter.Bindings; | ||
|
||
public unsafe partial struct TSQueryCursorOptions | ||
{ | ||
public void* payload; | ||
|
||
[NativeTypeName("bool (*)(TSQueryCursorState *)")] | ||
public delegate* unmanaged[Cdecl]<TSQueryCursorState*, byte> progress_callback; | ||
} |
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,9 @@ | ||
namespace TreeSitter.Bindings; | ||
|
||
public unsafe partial struct TSQueryCursorState | ||
{ | ||
public void* payload; | ||
|
||
[NativeTypeName("uint32_t")] | ||
public uint current_byte_offset; | ||
} |
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
29 changes: 29 additions & 0 deletions
29
tests/TreeSitter.Bindings.UnitTests/TSLanguageMetadataTests.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,29 @@ | ||
using System.Runtime.InteropServices; | ||
using Xunit; | ||
|
||
namespace TreeSitter.Bindings.UnitTests; | ||
|
||
/// <summary>Provides validation of the <see cref="TSLanguageMetadata" /> struct.</summary> | ||
public static unsafe partial class TSLanguageMetadataTests | ||
{ | ||
/// <summary>Validates that the <see cref="TSLanguageMetadata" /> struct is blittable.</summary> | ||
[Fact] | ||
public static void IsBlittableTest() | ||
{ | ||
Assert.Equal(sizeof(TSLanguageMetadata), Marshal.SizeOf<TSLanguageMetadata>()); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSLanguageMetadata" /> struct has the right <see cref="LayoutKind" />.</summary> | ||
[Fact] | ||
public static void IsLayoutSequentialTest() | ||
{ | ||
Assert.True(typeof(TSLanguageMetadata).IsLayoutSequential); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSLanguageMetadata" /> struct has the correct size.</summary> | ||
[Fact] | ||
public static void SizeOfTest() | ||
{ | ||
Assert.Equal(3, sizeof(TSLanguageMetadata)); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
tests/TreeSitter.Bindings.UnitTests/TSParseOptionsTests.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,37 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using Xunit; | ||
|
||
namespace TreeSitter.Bindings.UnitTests; | ||
|
||
/// <summary>Provides validation of the <see cref="TSParseOptions" /> struct.</summary> | ||
public static unsafe partial class TSParseOptionsTests | ||
{ | ||
/// <summary>Validates that the <see cref="TSParseOptions" /> struct is blittable.</summary> | ||
[Fact] | ||
public static void IsBlittableTest() | ||
{ | ||
Assert.Equal(sizeof(TSParseOptions), Marshal.SizeOf<TSParseOptions>()); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSParseOptions" /> struct has the right <see cref="LayoutKind" />.</summary> | ||
[Fact] | ||
public static void IsLayoutSequentialTest() | ||
{ | ||
Assert.True(typeof(TSParseOptions).IsLayoutSequential); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSParseOptions" /> struct has the correct size.</summary> | ||
[Fact] | ||
public static void SizeOfTest() | ||
{ | ||
if (Environment.Is64BitProcess) | ||
{ | ||
Assert.Equal(16, sizeof(TSParseOptions)); | ||
} | ||
else | ||
{ | ||
Assert.Equal(8, sizeof(TSParseOptions)); | ||
} | ||
} | ||
} |
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,37 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using Xunit; | ||
|
||
namespace TreeSitter.Bindings.UnitTests; | ||
|
||
/// <summary>Provides validation of the <see cref="TSParseState" /> struct.</summary> | ||
public static unsafe partial class TSParseStateTests | ||
{ | ||
/// <summary>Validates that the <see cref="TSParseState" /> struct is blittable.</summary> | ||
[Fact] | ||
public static void IsBlittableTest() | ||
{ | ||
Assert.Equal(sizeof(TSParseState), Marshal.SizeOf<TSParseState>()); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSParseState" /> struct has the right <see cref="LayoutKind" />.</summary> | ||
[Fact] | ||
public static void IsLayoutSequentialTest() | ||
{ | ||
Assert.True(typeof(TSParseState).IsLayoutSequential); | ||
} | ||
|
||
/// <summary>Validates that the <see cref="TSParseState" /> struct has the correct size.</summary> | ||
[Fact] | ||
public static void SizeOfTest() | ||
{ | ||
if (Environment.Is64BitProcess) | ||
{ | ||
Assert.Equal(16, sizeof(TSParseState)); | ||
} | ||
else | ||
{ | ||
Assert.Equal(12, sizeof(TSParseState)); | ||
} | ||
} | ||
} |
Oops, something went wrong.