shell-lite 0.4.0__py3-none-any.whl → 0.4.1__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.
shell_lite/interpreter.py CHANGED
@@ -1069,6 +1069,7 @@ class Interpreter:
1069
1069
  result = None
1070
1070
  for stmt in statements:
1071
1071
  result = self.visit(stmt)
1072
+ self.current_env.set('__exec_result__', result)
1072
1073
  return result
1073
1074
  def visit_ImportAs(self, node: ImportAs):
1074
1075
  if node.path in self.std_modules:
@@ -1518,7 +1519,7 @@ class Interpreter:
1518
1519
  self.wfile.write(str(e).encode())
1519
1520
  except: pass
1520
1521
  server = HTTPServer(('0.0.0.0', port_val), ShellLiteHandler)
1521
- print(f"\n ShellLite Server v0.03.4 is running!")
1522
+ print(f"\n ShellLite Server v0.04.1 is running!")
1522
1523
  print(f" \u001b[1;36m➜\u001b[0m Local: \u001b[1;4;36mhttp://localhost:{port_val}/\u001b[0m\n")
1523
1524
  try: server.serve_forever()
1524
1525
  except KeyboardInterrupt:
shell_lite/lexer.py CHANGED
@@ -195,7 +195,7 @@ class Lexer:
195
195
  'copy': 'COPY', 'paste': 'PASTE', 'clipboard': 'CLIPBOARD',
196
196
  'press': 'PRESS', 'type': 'TYPE', 'click': 'CLICK', 'at': 'AT',
197
197
  'notify': 'NOTIFY',
198
- 'date': 'DATE', 'today': 'TODAY', 'after': 'AFTER', 'before': 'BEFORE',
198
+ 'date': 'ID', 'today': 'ID', 'after': 'AFTER', 'before': 'BEFORE',
199
199
  'list': 'LIST', 'set': 'SET', 'unique': 'UNIQUE', 'of': 'OF',
200
200
  'wait': 'WAIT',
201
201
  'convert': 'CONVERT', 'json': 'JSON',
@@ -223,9 +223,9 @@ class Lexer:
223
223
  'count': 'COUNT', 'many': 'MANY', 'how': 'HOW',
224
224
  'field': 'FIELD', 'submit': 'SUBMIT', 'named': 'NAMED',
225
225
  'placeholder': 'PLACEHOLDER',
226
- 'app': 'APP', 'title': 'TITLE', 'size': 'SIZE',
227
- 'column': 'COLUMN', 'row': 'ROW',
228
- 'button': 'BUTTON', 'heading': 'HEADING', 'text': 'TEXT',
226
+ 'app': 'APP', 'title': 'ID', 'size': 'ID',
227
+ 'column': 'ID', 'row': 'ID',
228
+ 'button': 'ID', 'heading': 'HEADING', 'text': 'ID',
229
229
  }
230
230
  token_type = keywords.get(value, 'ID')
231
231
  self.tokens.append(Token(token_type, value, self.line_number, current_col))
shell_lite/main.py CHANGED
@@ -61,7 +61,7 @@ def run_repl():
61
61
  print("\n" + "="*40)
62
62
  print(" ShellLite REPL - English Syntax")
63
63
  print("="*40)
64
- print("Version: v0.04.0 | Made by Shrey Naithani")
64
+ print("Version: v0.04.1 | Made by Shrey Naithani")
65
65
  print("Commands: Type 'exit' to quit, 'help' for examples.")
66
66
  print("Note: Terminal commands (like 'shl install') must be run in CMD/PowerShell, not here.")
67
67
 
@@ -192,7 +192,7 @@ def install_globally():
192
192
  ps_cmd = f'$oldPath = [Environment]::GetEnvironmentVariable("Path", "User"); if ($oldPath -notlike "*ShellLite*") {{ [Environment]::SetEnvironmentVariable("Path", "$oldPath;{install_dir}", "User") }}'
193
193
  subprocess.run(["powershell", "-Command", ps_cmd], capture_output=True)
194
194
 
195
- print(f"\n[SUCCESS] ShellLite (v0.03.6) is installed!")
195
+ print(f"\n[SUCCESS] ShellLite (v0.04.1) is installed!")
196
196
  print(f"Location: {install_dir}")
197
197
  print("\nIMPORTANT STEP REQUIRED:")
198
198
  print("1. Close ALL open terminal windows (CMD, PowerShell, VS Code).")
@@ -551,6 +551,11 @@ def main():
551
551
  line = int(sys.argv[3])
552
552
  col = int(sys.argv[4])
553
553
  resolve_cursor(filename, line, col)
554
+ elif cmd == "run":
555
+ if len(sys.argv) > 2:
556
+ run_file(sys.argv[2])
557
+ else:
558
+ print("Usage: shl run <filename>")
554
559
  else:
555
560
  run_file(sys.argv[1])
556
561
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shell-lite
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: A lightweight, English-like scripting language.
5
5
  Author-email: Shrey Naithani <contact@shelllite.tech>
6
6
  License: MIT
@@ -11,6 +11,8 @@ Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  Requires-Dist: prompt-toolkit>=3.0.0
13
13
 
14
+ <img src="assets/logo.png" align="right" width="250" alt="ShellLite Logo" />
15
+
14
16
  # ShellLite: The English-Like Programming Language
15
17
  # By Shrey Naithani
16
18
  ShellLite is a modern, interpreted programming language designed to prioritize human readability. It replaces complex syntax with natural English commands, making software development accessible and maintainable.
@@ -3,15 +3,15 @@ shell_lite/ast_nodes.py,sha256=KGFlZmP21MJXo6uRYRJfo_R3BEspfDD8xMBtAVfUDgU,5873
3
3
  shell_lite/cli.py,sha256=14Kq1ohSXS3p-xdh0DPi7eXskUtSX81huSyGhktoOMA,250
4
4
  shell_lite/compiler.py,sha256=FcwDLbrjnMnH0VMzEeYPSqD3nIeFAwKIdvEDAT1e3GE,24984
5
5
  shell_lite/formatter.py,sha256=590BfQmhsX466i5_xONXAhgVE97zfcV79q1wA3DT47A,2952
6
- shell_lite/interpreter.py,sha256=XcVMRqhxWdVKXoD1I8GKJDa-E474PKxJCeZ62I3BRUM,74520
6
+ shell_lite/interpreter.py,sha256=oyyFIe8bx4Tok09Nd-qIexU6D9rVdvyxe2JVzCaHHTY,74577
7
7
  shell_lite/js_compiler.py,sha256=b2-XyGqm2BYUfwU0OsphpMxLNeho1ihL7htAcg3uWII,9438
8
- shell_lite/lexer.py,sha256=Z26uJX1I_stImRsovqkgnDeOKkSloNlKOpXj5qdLEnc,12570
9
- shell_lite/main.py,sha256=nzBCAHNQTq3D2-cUeGXkgnC7oESXStT7j2orCuTFNyg,22344
8
+ shell_lite/lexer.py,sha256=UDQtFX7UW3HgMftQ3HsCu9tfImk9vsyMX5icsAI6NuE,12549
9
+ shell_lite/main.py,sha256=h-RIPB-QcfQdQslafILdztJqKcRf9exoNF0gYMXWVww,22517
10
10
  shell_lite/parser.py,sha256=Eh-LjIX1AdYyuhPaL-_GPlDoSzDM0RxDNQsBWog-06k,73377
11
11
  shell_lite/runtime.py,sha256=pSjBeA1dTQ-a94q3FLdv9lqZurdd6MJmfhFGHhOoQEM,16057
12
- shell_lite-0.4.0.dist-info/LICENSE,sha256=33eziKLPxbqGCqdHtEHAFe1KSOgqc0-jWUQmdgKq85Q,1092
13
- shell_lite-0.4.0.dist-info/METADATA,sha256=AZGYOeRcbk7MGrm5IAYtFNqwUaABgoeTqMQWHFyiCTE,2395
14
- shell_lite-0.4.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
15
- shell_lite-0.4.0.dist-info/entry_points.txt,sha256=tglL8tjyPIh1W85j6zFpNZjMpQe_xC-k-7BOhHLWfxc,45
16
- shell_lite-0.4.0.dist-info/top_level.txt,sha256=hIln5ltrok_Mn3ijlQeqMFF6hHBHCyhzqCO7KL358cg,11
17
- shell_lite-0.4.0.dist-info/RECORD,,
12
+ shell_lite-0.4.1.dist-info/LICENSE,sha256=33eziKLPxbqGCqdHtEHAFe1KSOgqc0-jWUQmdgKq85Q,1092
13
+ shell_lite-0.4.1.dist-info/METADATA,sha256=7S7UoqTYKp5Wq1oZhTscVOrhCAT64iQs_k8L9QDJxaI,2475
14
+ shell_lite-0.4.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
15
+ shell_lite-0.4.1.dist-info/entry_points.txt,sha256=tglL8tjyPIh1W85j6zFpNZjMpQe_xC-k-7BOhHLWfxc,45
16
+ shell_lite-0.4.1.dist-info/top_level.txt,sha256=hIln5ltrok_Mn3ijlQeqMFF6hHBHCyhzqCO7KL358cg,11
17
+ shell_lite-0.4.1.dist-info/RECORD,,