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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.6.5-FF6B35?style=for-the-badge)
5
+ ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.6.6-FF6B35?style=for-the-badge)
6
6
  [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)
7
7
  [![Python](https://img.shields.io/badge/Python-3.8+-3776AB?style=for-the-badge&logo=python)](https://python.org)
8
8
  [![GitHub](https://img.shields.io/badge/GitHub-Zaidux/zexus--interpreter-181717?style=for-the-badge&logo=github)](https://github.com/Zaidux/zexus-interpreter)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zexus",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "A modern, security-first programming language with blockchain support",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -4,7 +4,7 @@ Zexus Programming Language
4
4
  A declarative, intent-based programming language for modern applications.
5
5
  """
6
6
 
7
- __version__ = "1.6.5"
7
+ __version__ = "1.6.6"
8
8
  __author__ = "Ziver Labs"
9
9
  __email__ = "ziverofficial567@gmail.com"
10
10
 
@@ -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.5", prog_name="Zexus")
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,
@@ -18,7 +18,7 @@ console = Console()
18
18
 
19
19
 
20
20
  @click.group()
21
- @click.version_option(version="1.6.5", prog_name="ZPM")
21
+ @click.version_option(version="1.6.6", prog_name="ZPM")
22
22
  def cli():
23
23
  """ZPM - Zexus Package Manager
24
24
 
@@ -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
- print(f" has_assign={has_assign}, tj.type={tj.type}")
736
- if has_assign:
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.5") -> Dict:
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.5
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
- ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.6.5-FF6B35?style=for-the-badge)
53
+ ![Zexus Logo](https://img.shields.io/badge/Zexus-v1.6.6-FF6B35?style=for-the-badge)
54
54
  [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](LICENSE)
55
55
  [![Python](https://img.shields.io/badge/Python-3.8+-3776AB?style=for-the-badge&logo=python)](https://python.org)
56
56
  [![GitHub](https://img.shields.io/badge/GitHub-Zaidux/zexus--interpreter-181717?style=for-the-badge&logo=github)](https://github.com/Zaidux/zexus-interpreter)
@@ -348,6 +348,7 @@ examples/test_sqlite.zx
348
348
  examples/token_contract.zx
349
349
  examples/ziver_chain_test.zx
350
350
  issues/ISSUE2.md
351
+ issues/ISSUE3.md
351
352
  issues/ISSUSE1.md
352
353
  linguist-submission/SUBMISSION_INSTRUCTIONS.md
353
354
  linguist-submission/grammars.yml