add bindings and fix documentation

This commit is contained in:
danhanson committed 2026-09-16 14:26:03 -05:00
1 parent 0e8ef8e7a5
commit 53e1ee2036
34 files changed
+1472 -12

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#ifndef TREE_SITTER_DJANGO_H_
#define TREE_SITTER_DJANGO_H_
typedef struct TSLanguage TSLanguage;
#ifdef __cplusplus
extern "C" {
#endif
const TSLanguage *tree_sitter_django(void);
#ifdef __cplusplus
}
#endif
#endif // TREE_SITTER_DJANGO_H_
@@ -0,0 +1,12 @@
import XCTest
import SwiftTreeSitter
import TreeSitterDjango
final class TreeSitterDjangoTests: XCTestCase {
func testCanLoadGrammar() throws {
let parser = Parser()
let language = Language(language: tree_sitter_django())
XCTAssertNoThrow(try parser.setLanguage(language),
"Error loading Django Parser grammar")
}
}