zexus 1.6.5 → 1.6.6
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/zexus/__init__.py +1 -1
- package/src/zexus/cli/main.py +1 -1
- package/src/zexus/cli/zpm.py +1 -1
- package/src/zexus/parser/strategy_structural.py +22 -2
- package/src/zexus/zpm/package_manager.py +1 -1
- package/src/zexus.egg-info/PKG-INFO +2 -2
- package/src/zexus.egg-info/SOURCES.txt +1 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://python.org)
|
|
8
8
|
[](https://github.com/Zaidux/zexus-interpreter)
|
package/package.json
CHANGED
package/src/zexus/__init__.py
CHANGED
package/src/zexus/cli/main.py
CHANGED
|
@@ -91,7 +91,7 @@ def show_all_commands():
|
|
|
91
91
|
console.print("\n[bold green]💡 Tip:[/bold green] Use 'zx <command> --help' for detailed command options\n")
|
|
92
92
|
|
|
93
93
|
@click.group(invoke_without_command=True)
|
|
94
|
-
@click.version_option(version="1.6.
|
|
94
|
+
@click.version_option(version="1.6.6", prog_name="Zexus")
|
|
95
95
|
@click.option('--syntax-style', type=click.Choice(['universal', 'tolerable', 'auto']),
|
|
96
96
|
default='auto', help='Syntax style to use (universal=strict, tolerable=flexible)')
|
|
97
97
|
@click.option('--advanced-parsing', is_flag=True, default=True,
|
package/src/zexus/cli/zpm.py
CHANGED
|
@@ -732,8 +732,27 @@ class StructuralAnalyzer:
|
|
|
732
732
|
if paren_count == 0 and bracket_count == 0:
|
|
733
733
|
# Check if run_tokens contains an assignment (this is a complete assignment statement)
|
|
734
734
|
has_assign = any(tok.type == ASSIGN for tok in run_tokens)
|
|
735
|
-
|
|
736
|
-
if
|
|
735
|
+
|
|
736
|
+
# CRITICAL FIX: Also check if this is a method call OR indexed assignment statement
|
|
737
|
+
# Method call: IDENT DOT IDENT LPAREN
|
|
738
|
+
# Indexed assignment: IDENT LBRACKET ... RBRACKET ASSIGN
|
|
739
|
+
is_method_call_stmt = False
|
|
740
|
+
is_indexed_assign_stmt = False
|
|
741
|
+
|
|
742
|
+
if len(run_tokens) >= 4:
|
|
743
|
+
# Check for method call pattern: IDENT DOT IDENT LPAREN ... RPAREN
|
|
744
|
+
has_dot = any(tok.type == DOT for tok in run_tokens)
|
|
745
|
+
if has_dot and run_tokens[0].type == IDENT:
|
|
746
|
+
is_method_call_stmt = True
|
|
747
|
+
|
|
748
|
+
# Check for indexed assignment pattern: IDENT LBRACKET ... RBRACKET ASSIGN ...
|
|
749
|
+
# Look for IDENT followed by LBRACKET
|
|
750
|
+
for idx, tok in enumerate(run_tokens[:-1]):
|
|
751
|
+
if tok.type == IDENT and run_tokens[idx + 1].type == LBRACKET:
|
|
752
|
+
is_indexed_assign_stmt = True
|
|
753
|
+
break
|
|
754
|
+
|
|
755
|
+
if has_assign or is_method_call_stmt or is_indexed_assign_stmt:
|
|
737
756
|
# Current token is on a new line and could start a new statement
|
|
738
757
|
# Check if it's IDENT (could be method call, function call, or property access)
|
|
739
758
|
if tj.type == IDENT:
|
|
@@ -826,6 +845,7 @@ class StructuralAnalyzer:
|
|
|
826
845
|
|
|
827
846
|
filtered_run_tokens = [tk for tk in run_tokens if not _is_empty_token(tk)]
|
|
828
847
|
if filtered_run_tokens: # Only create block if we have meaningful tokens
|
|
848
|
+
print(f"[DEBUG STRUCTURAL] Creating block from tokens: {[f'{t.type}:{t.literal}' for t in filtered_run_tokens[:10]]}")
|
|
829
849
|
self.blocks[block_id] = {
|
|
830
850
|
'id': block_id,
|
|
831
851
|
'type': 'statement',
|
|
@@ -23,7 +23,7 @@ class PackageManager:
|
|
|
23
23
|
self.installer = PackageInstaller(self.zpm_dir)
|
|
24
24
|
self.publisher = PackagePublisher(self.registry)
|
|
25
25
|
|
|
26
|
-
def init(self, name: str = None, version: str = "1.6.
|
|
26
|
+
def init(self, name: str = None, version: str = "1.6.6") -> Dict:
|
|
27
27
|
"""Initialize a new Zexus project with package.json"""
|
|
28
28
|
if self.config_file.exists():
|
|
29
29
|
print(f"⚠️ {self.config_file} already exists")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zexus
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.6
|
|
4
4
|
Summary: A modern, security-first programming language with blockchain support
|
|
5
5
|
Home-page: https://github.com/Zaidux/zexus-interpreter
|
|
6
6
|
Author: Zaidux
|
|
@@ -50,7 +50,7 @@ Dynamic: requires-python
|
|
|
50
50
|
|
|
51
51
|
<div align="center">
|
|
52
52
|
|
|
53
|
-

|
|
54
54
|
[](LICENSE)
|
|
55
55
|
[](https://python.org)
|
|
56
56
|
[](https://github.com/Zaidux/zexus-interpreter)
|