jaclang 0.7.29__py3-none-any.whl → 0.7.31__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jaclang might be problematic. Click here for more details.
- jaclang/__init__.py +419 -3
- jaclang/compiler/__init__.py +1 -1
- jaclang/compiler/absyntree.py +15 -5
- jaclang/compiler/compile.py +1 -1
- jaclang/compiler/constant.py +4 -5
- jaclang/compiler/jac.lark +227 -180
- jaclang/compiler/parser.py +1335 -1826
- jaclang/compiler/passes/main/fuse_typeinfo_pass.py +2 -2
- jaclang/compiler/passes/main/import_pass.py +3 -2
- jaclang/compiler/passes/main/pyast_gen_pass.py +570 -747
- jaclang/compiler/passes/main/tests/test_import_pass.py +4 -1
- jaclang/compiler/passes/main/tests/test_type_check_pass.py +6 -3
- jaclang/compiler/passes/tool/jac_formatter_pass.py +0 -1
- jaclang/compiler/tests/test_importer.py +45 -1
- jaclang/compiler/tests/test_parser.py +13 -5
- jaclang/plugin/builtin.py +11 -0
- jaclang/plugin/default.py +55 -20
- jaclang/plugin/feature.py +14 -5
- jaclang/plugin/spec.py +16 -6
- jaclang/plugin/tests/fixtures/graph_purger.jac +2 -0
- jaclang/plugin/tests/fixtures/other_root_access.jac +1 -0
- jaclang/plugin/tests/fixtures/savable_object.jac +2 -0
- jaclang/plugin/tests/test_jaseci.py +1 -1
- jaclang/runtimelib/architype.py +11 -21
- jaclang/runtimelib/context.py +25 -9
- jaclang/runtimelib/importer.py +26 -3
- jaclang/runtimelib/machine.py +2 -2
- jaclang/settings.py +2 -0
- jaclang/tests/fixtures/create_dynamic_architype.jac +1 -1
- jaclang/tests/fixtures/nested_impls.jac +55 -0
- jaclang/tests/test_cli.py +1 -1
- jaclang/tests/test_language.py +27 -13
- jaclang/tests/test_reference.py +2 -2
- jaclang/utils/helpers.py +4 -3
- jaclang/utils/test.py +2 -2
- jaclang/utils/tests/test_lang_tools.py +4 -2
- {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/METADATA +2 -2
- {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/RECORD +40 -39
- {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/WHEEL +1 -1
- {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/entry_points.txt +0 -0
|
@@ -604,8 +604,8 @@ class FuseTypeInfoPass(Pass):
|
|
|
604
604
|
node_type: str = ""
|
|
605
605
|
|
|
606
606
|
# left type is a list
|
|
607
|
-
if left.expr_type.startswith("builtins.list["):
|
|
608
|
-
node_type = left.expr_type[
|
|
607
|
+
if left.expr_type.startswith(("builtins.list[", "jaclang.JacList[")):
|
|
608
|
+
node_type = left.expr_type[left.expr_type.find("[") + 1 : -1]
|
|
609
609
|
|
|
610
610
|
# right index slice is a range then it's type is the same as left
|
|
611
611
|
if right.is_range:
|
|
@@ -186,7 +186,7 @@ class JacImportPass(Pass):
|
|
|
186
186
|
self.warnings_had += mod_pass.warnings_had
|
|
187
187
|
mod = mod_pass.ir
|
|
188
188
|
except Exception as e:
|
|
189
|
-
logger.
|
|
189
|
+
logger.error(e)
|
|
190
190
|
mod = None
|
|
191
191
|
if isinstance(mod, ast.Module):
|
|
192
192
|
self.import_table[target] = mod
|
|
@@ -472,7 +472,8 @@ class PyImportPass(JacImportPass):
|
|
|
472
472
|
if mod:
|
|
473
473
|
mod.name = imported_mod_name if imported_mod_name else mod.name
|
|
474
474
|
if mod.name == "__init__":
|
|
475
|
-
|
|
475
|
+
# (thakee): This needs to be re-done after implementing path handling properly.
|
|
476
|
+
mod_name = mod.loc.mod_path.split(os.path.sep)[-2]
|
|
476
477
|
self.__debug_print(
|
|
477
478
|
f"\tRaised the __init__ file and rename the mod to be {mod_name}"
|
|
478
479
|
)
|