jaclang 0.5.16__py3-none-any.whl → 0.5.17__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/cli/cli.py +1 -1
- jaclang/compiler/absyntree.py +4 -4
- jaclang/compiler/generated/jac_parser.py +2 -2
- jaclang/compiler/parser.py +2 -2
- jaclang/compiler/passes/main/import_pass.py +2 -2
- jaclang/compiler/passes/main/pyast_gen_pass.py +2 -2
- jaclang/compiler/passes/main/pyast_load_pass.py +2 -2
- jaclang/compiler/passes/main/sym_tab_build_pass.py +1 -1
- jaclang/compiler/passes/tool/jac_formatter_pass.py +144 -21
- jaclang/compiler/passes/tool/tests/test_jac_format_pass.py +66 -55
- jaclang/compiler/workspace.py +2 -2
- {jaclang-0.5.16.dist-info → jaclang-0.5.17.dist-info}/METADATA +1 -1
- {jaclang-0.5.16.dist-info → jaclang-0.5.17.dist-info}/RECORD +16 -18
- jaclang/compiler/tests/fixtures/__jac_gen__/__init__.py +0 -0
- jaclang/compiler/tests/fixtures/__jac_gen__/hello_world.py +0 -5
- {jaclang-0.5.16.dist-info → jaclang-0.5.17.dist-info}/WHEEL +0 -0
- {jaclang-0.5.16.dist-info → jaclang-0.5.17.dist-info}/entry_points.txt +0 -0
- {jaclang-0.5.16.dist-info → jaclang-0.5.17.dist-info}/top_level.txt +0 -0
jaclang/cli/cli.py
CHANGED
jaclang/compiler/absyntree.py
CHANGED
|
@@ -591,7 +591,7 @@ class Import(ElementStmt, CodeBlockStmt):
|
|
|
591
591
|
|
|
592
592
|
def __init__(
|
|
593
593
|
self,
|
|
594
|
-
|
|
594
|
+
hint: SubTag[Name],
|
|
595
595
|
paths: list[ModulePath],
|
|
596
596
|
items: Optional[SubNodeList[ModuleItem]],
|
|
597
597
|
is_absorb: bool, # For includes
|
|
@@ -599,7 +599,7 @@ class Import(ElementStmt, CodeBlockStmt):
|
|
|
599
599
|
doc: Optional[String] = None,
|
|
600
600
|
) -> None:
|
|
601
601
|
"""Initialize import node."""
|
|
602
|
-
self.
|
|
602
|
+
self.hint = hint
|
|
603
603
|
self.paths = paths
|
|
604
604
|
self.items = items
|
|
605
605
|
self.is_absorb = is_absorb
|
|
@@ -610,7 +610,7 @@ class Import(ElementStmt, CodeBlockStmt):
|
|
|
610
610
|
"""Normalize import node."""
|
|
611
611
|
res = True
|
|
612
612
|
if deep:
|
|
613
|
-
res = self.
|
|
613
|
+
res = self.hint.normalize(deep)
|
|
614
614
|
for p in self.paths:
|
|
615
615
|
res = res and p.normalize(deep)
|
|
616
616
|
res = res and self.items.normalize(deep) if self.items else res
|
|
@@ -622,7 +622,7 @@ class Import(ElementStmt, CodeBlockStmt):
|
|
|
622
622
|
new_kid.append(self.gen_token(Tok.KW_INCLUDE))
|
|
623
623
|
else:
|
|
624
624
|
new_kid.append(self.gen_token(Tok.KW_IMPORT))
|
|
625
|
-
new_kid.append(self.
|
|
625
|
+
new_kid.append(self.hint)
|
|
626
626
|
if self.items:
|
|
627
627
|
new_kid.append(self.gen_token(Tok.KW_FROM))
|
|
628
628
|
for p in self.paths:
|