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.

Files changed (40) hide show
  1. jaclang/__init__.py +419 -3
  2. jaclang/compiler/__init__.py +1 -1
  3. jaclang/compiler/absyntree.py +15 -5
  4. jaclang/compiler/compile.py +1 -1
  5. jaclang/compiler/constant.py +4 -5
  6. jaclang/compiler/jac.lark +227 -180
  7. jaclang/compiler/parser.py +1335 -1826
  8. jaclang/compiler/passes/main/fuse_typeinfo_pass.py +2 -2
  9. jaclang/compiler/passes/main/import_pass.py +3 -2
  10. jaclang/compiler/passes/main/pyast_gen_pass.py +570 -747
  11. jaclang/compiler/passes/main/tests/test_import_pass.py +4 -1
  12. jaclang/compiler/passes/main/tests/test_type_check_pass.py +6 -3
  13. jaclang/compiler/passes/tool/jac_formatter_pass.py +0 -1
  14. jaclang/compiler/tests/test_importer.py +45 -1
  15. jaclang/compiler/tests/test_parser.py +13 -5
  16. jaclang/plugin/builtin.py +11 -0
  17. jaclang/plugin/default.py +55 -20
  18. jaclang/plugin/feature.py +14 -5
  19. jaclang/plugin/spec.py +16 -6
  20. jaclang/plugin/tests/fixtures/graph_purger.jac +2 -0
  21. jaclang/plugin/tests/fixtures/other_root_access.jac +1 -0
  22. jaclang/plugin/tests/fixtures/savable_object.jac +2 -0
  23. jaclang/plugin/tests/test_jaseci.py +1 -1
  24. jaclang/runtimelib/architype.py +11 -21
  25. jaclang/runtimelib/context.py +25 -9
  26. jaclang/runtimelib/importer.py +26 -3
  27. jaclang/runtimelib/machine.py +2 -2
  28. jaclang/settings.py +2 -0
  29. jaclang/tests/fixtures/create_dynamic_architype.jac +1 -1
  30. jaclang/tests/fixtures/nested_impls.jac +55 -0
  31. jaclang/tests/test_cli.py +1 -1
  32. jaclang/tests/test_language.py +27 -13
  33. jaclang/tests/test_reference.py +2 -2
  34. jaclang/utils/helpers.py +4 -3
  35. jaclang/utils/test.py +2 -2
  36. jaclang/utils/tests/test_lang_tools.py +4 -2
  37. {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/METADATA +2 -2
  38. {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/RECORD +40 -39
  39. {jaclang-0.7.29.dist-info → jaclang-0.7.31.dist-info}/WHEEL +1 -1
  40. {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[len("builtins.list[") : -1]
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.info(e)
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
- mod_name = mod.loc.mod_path.split("/")[-2]
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
  )