Skip to content

Commit 779a3f4

Browse files
committed
small fixes
1 parent 47fa24a commit 779a3f4

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cedarscript_grammar/__init__.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
_ROOT_DIR = Path(__file__).parent
1111

1212

13-
# Explicitly cast to str as tree_sitter.Language.build expects str
14-
_SHARED_LIB_PATH = str((_ROOT_DIR / "cedarscript.so").absolute())
15-
16-
1713
def language() -> Language:
1814
"""Load the tree-sitter library for CEDARScript."""
1915

@@ -28,8 +24,6 @@ def language() -> Language:
2824
else:
2925
raise OSError(f"Unsupported platform: {sys.platform}")
3026

31-
# Explicitly cast to str as tree_sitter.Language.build expects str
32-
cedar_language_path = str((_ROOT_DIR / lib_name).absolute())
33-
# cedar_language_path = os.path.abspath(os.path.join(_ROOT_DIR, lib_name))
34-
logger.warning(f"[{__name__}] Loading native CEDARScript parsing library from {cedar_language_path}")
35-
return Language(cedar_language_path, "CEDARScript")
27+
language_path = str((_ROOT_DIR / lib_name).absolute())
28+
logger.warning(f"[{__name__}] Loading native CEDARScript parsing library from {language_path}")
29+
return Language(language_path, "CEDARScript")

0 commit comments

Comments
 (0)