shell-lite 0.4.1__tar.gz → 0.4.3__tar.gz
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-0.4.1/shell_lite.egg-info → shell_lite-0.4.3}/PKG-INFO +1 -1
- {shell_lite-0.4.1 → shell_lite-0.4.3}/pyproject.toml +1 -1
- shell_lite-0.4.3/shell_lite/fix_nulls.py +29 -0
- shell_lite-0.4.3/shell_lite/interpreter.py +1779 -0
- shell_lite-0.4.1/shell_lite/interpreter.py → shell_lite-0.4.3/shell_lite/interpreter_backup.py +74 -3
- shell_lite-0.4.3/shell_lite/interpreter_final.py +1773 -0
- shell_lite-0.4.3/shell_lite/interpreter_new.py +1773 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/lexer.py +10 -3
- shell_lite-0.4.3/shell_lite/lexer_new.py +252 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/main.py +17 -7
- shell_lite-0.4.3/shell_lite/minimal_interpreter.py +25 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/parser.py +279 -2
- shell_lite-0.4.3/shell_lite/parser_new.py +2229 -0
- shell_lite-0.4.3/shell_lite/patch_parser.py +41 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3/shell_lite.egg-info}/PKG-INFO +1 -1
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite.egg-info/SOURCES.txt +8 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/LICENSE +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/README.md +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/setup.cfg +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/__init__.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/ast_nodes.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/cli.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/compiler.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/formatter.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/js_compiler.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite/runtime.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite.egg-info/dependency_links.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite.egg-info/entry_points.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite.egg-info/requires.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/shell_lite.egg-info/top_level.txt +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/tests/test_interpreter.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/tests/test_lexer.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/tests/test_parser.py +0 -0
- {shell_lite-0.4.1 → shell_lite-0.4.3}/tests/test_stdlib.py +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import sys
|
|
3
|
+
import glob
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
files = [
|
|
7
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\parser.py',
|
|
8
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\lexer.py',
|
|
9
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\interpreter.py',
|
|
10
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\main.py',
|
|
11
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\ast_nodes.py',
|
|
12
|
+
r'c:\Users\shrey\OneDrive\Desktop\oka\tests_suite\repro_issues.shl'
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
for path in files:
|
|
16
|
+
try:
|
|
17
|
+
with open(path, 'rb') as f:
|
|
18
|
+
content = f.read()
|
|
19
|
+
|
|
20
|
+
if b'\x00' in content:
|
|
21
|
+
print(f"Null bytes found in {path}! Fixing...")
|
|
22
|
+
new_content = content.replace(b'\x00', b'')
|
|
23
|
+
with open(path, 'wb') as f:
|
|
24
|
+
f.write(new_content)
|
|
25
|
+
print(f"Fixed {path}.")
|
|
26
|
+
else:
|
|
27
|
+
print(f"No null bytes in {path}.")
|
|
28
|
+
except Exception as e:
|
|
29
|
+
print(f"Error checking {path}: {e}")
|