shell-lite 0.4.3__py3-none-any.whl → 0.4.5__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 +66 -47
- shell_lite/lexer.py +16 -8
- shell_lite/main.py +8 -9
- shell_lite/parser.py +264 -114
- {shell_lite-0.4.3.dist-info → shell_lite-0.4.5.dist-info}/METADATA +1 -1
- shell_lite-0.4.5.dist-info/RECORD +15 -0
- shell_lite/fix_nulls.py +0 -29
- shell_lite/formatter.py +0 -75
- shell_lite/interpreter_backup.py +0 -1781
- shell_lite/interpreter_final.py +0 -1773
- shell_lite/interpreter_new.py +0 -1773
- shell_lite/js_compiler.py +0 -220
- shell_lite/lexer_new.py +0 -252
- shell_lite/minimal_interpreter.py +0 -25
- shell_lite/parser_new.py +0 -2229
- shell_lite/patch_parser.py +0 -41
- shell_lite-0.4.3.dist-info/RECORD +0 -25
- {shell_lite-0.4.3.dist-info → shell_lite-0.4.5.dist-info}/LICENSE +0 -0
- {shell_lite-0.4.3.dist-info → shell_lite-0.4.5.dist-info}/WHEEL +0 -0
- {shell_lite-0.4.3.dist-info → shell_lite-0.4.5.dist-info}/entry_points.txt +0 -0
- {shell_lite-0.4.3.dist-info → shell_lite-0.4.5.dist-info}/top_level.txt +0 -0
shell_lite/patch_parser.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
target_file = r'c:\Users\shrey\OneDrive\Desktop\oka\shell-lite\shell_lite\parser.py'
|
|
5
|
-
|
|
6
|
-
with open(target_file, 'r', encoding='utf-8') as f:
|
|
7
|
-
content = f.read()
|
|
8
|
-
|
|
9
|
-
search_str = """ first_expr = self.parse_expression()
|
|
10
|
-
skip_formatted()
|
|
11
|
-
if self.check('FOR'):"""
|
|
12
|
-
|
|
13
|
-
replace_str = """ first_expr = self.parse_expression()
|
|
14
|
-
skip_formatted()
|
|
15
|
-
|
|
16
|
-
if self.check('TO'):
|
|
17
|
-
self.consume('TO')
|
|
18
|
-
end_val = self.parse_expression()
|
|
19
|
-
skip_formatted()
|
|
20
|
-
self.consume('RBRACKET')
|
|
21
|
-
node = Call('range', [first_expr, end_val])
|
|
22
|
-
node.line = token.line
|
|
23
|
-
return node
|
|
24
|
-
|
|
25
|
-
if self.check('FOR'):"""
|
|
26
|
-
|
|
27
|
-
if search_str in content:
|
|
28
|
-
new_content = content.replace(search_str, replace_str)
|
|
29
|
-
with open(target_file, 'w', encoding='utf-8') as f:
|
|
30
|
-
f.write(new_content)
|
|
31
|
-
print("Successfully patched parser.py")
|
|
32
|
-
else:
|
|
33
|
-
print("Could not find search string. Trying flexible match.")
|
|
34
|
-
# Try normalized newlines?
|
|
35
|
-
# Or just print a nearby chunk to debug
|
|
36
|
-
idx = content.find("first_expr = self.parse_expression()")
|
|
37
|
-
if idx != -1:
|
|
38
|
-
print(f"Found anchor at {idx}. Context:")
|
|
39
|
-
print(repr(content[idx:idx+100]))
|
|
40
|
-
else:
|
|
41
|
-
print("Anchor not found.")
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
shell_lite/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
-
shell_lite/ast_nodes.py,sha256=KGFlZmP21MJXo6uRYRJfo_R3BEspfDD8xMBtAVfUDgU,5873
|
|
3
|
-
shell_lite/cli.py,sha256=14Kq1ohSXS3p-xdh0DPi7eXskUtSX81huSyGhktoOMA,250
|
|
4
|
-
shell_lite/compiler.py,sha256=FcwDLbrjnMnH0VMzEeYPSqD3nIeFAwKIdvEDAT1e3GE,24984
|
|
5
|
-
shell_lite/fix_nulls.py,sha256=m-2M6UuVQkwAMAyskQQ0r9u3_Y7U8rpES5aTRnEJNlk,1023
|
|
6
|
-
shell_lite/formatter.py,sha256=590BfQmhsX466i5_xONXAhgVE97zfcV79q1wA3DT47A,2952
|
|
7
|
-
shell_lite/interpreter.py,sha256=9v699pG--ukq6p8oKLhKH5SLQLgM3uxf-2kgRVgRWjo,77624
|
|
8
|
-
shell_lite/interpreter_backup.py,sha256=e8KwKDpDy8T68aoUODQxuL6ocMKPQ3JYn4Hp2WFBM_k,77711
|
|
9
|
-
shell_lite/interpreter_final.py,sha256=OJODZa0t4nBnakQTHZZqdzpSwiXjor84XpW4Aaz7ncs,77664
|
|
10
|
-
shell_lite/interpreter_new.py,sha256=2J3oEm4zmv2CBrgzplW46XbuZZn_M8ZRKuDznNljZ5k,77665
|
|
11
|
-
shell_lite/js_compiler.py,sha256=b2-XyGqm2BYUfwU0OsphpMxLNeho1ihL7htAcg3uWII,9438
|
|
12
|
-
shell_lite/lexer.py,sha256=P3q9oI0uBvAnKJ7LdAZUzCPrYDU97_eEDV4tRdDKc_g,13036
|
|
13
|
-
shell_lite/lexer_new.py,sha256=sckocMSfkLGelvuJn_wVvJtVKvhCdpp1_FXXeju_RKo,13397
|
|
14
|
-
shell_lite/main.py,sha256=5rm8kpePKs5y0isMmyRj8jexEOomnrKYOezDIZNg3Cw,22972
|
|
15
|
-
shell_lite/minimal_interpreter.py,sha256=MmQoJ9WAkjCmPk77PuBhTvKBhXLuD0TeNGTXazTwxZ0,785
|
|
16
|
-
shell_lite/parser.py,sha256=JYodc3WyxhEUsqMxfsNDRCa1gTH0zrRYkAp_r4CaWjo,79158
|
|
17
|
-
shell_lite/parser_new.py,sha256=I-8F5h8XnEV7dqCZ_4WR7cvXsdcoYGZyCZtAyeHC6lw,87339
|
|
18
|
-
shell_lite/patch_parser.py,sha256=bmZqFQV_19zNDfyN060IRzz8Lmd-w296qpRkCCXoVjY,1335
|
|
19
|
-
shell_lite/runtime.py,sha256=pSjBeA1dTQ-a94q3FLdv9lqZurdd6MJmfhFGHhOoQEM,16057
|
|
20
|
-
shell_lite-0.4.3.dist-info/LICENSE,sha256=33eziKLPxbqGCqdHtEHAFe1KSOgqc0-jWUQmdgKq85Q,1092
|
|
21
|
-
shell_lite-0.4.3.dist-info/METADATA,sha256=mV_0mdT-x4NaN8IY8GYlsZvkyHDX2hgPWLyiLp4FnD8,2475
|
|
22
|
-
shell_lite-0.4.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
23
|
-
shell_lite-0.4.3.dist-info/entry_points.txt,sha256=tglL8tjyPIh1W85j6zFpNZjMpQe_xC-k-7BOhHLWfxc,45
|
|
24
|
-
shell_lite-0.4.3.dist-info/top_level.txt,sha256=hIln5ltrok_Mn3ijlQeqMFF6hHBHCyhzqCO7KL358cg,11
|
|
25
|
-
shell_lite-0.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|