Apr-23-2025, 01:25 PM
I'm trying to make my own language with the help of python,
but my code isn't running, why?!
main.py:
but my code isn't running, why?!
main.py:
script = open('script.jell', 'r').readlines()
def debug(line):
# support
def characters(sp, ep):
save = ''
for i in range(sp, ep):
save += line[i]
return save
def get_cmd_type():
c = 0
save = ''
not_end = True
while not_end:
c += 1
if line[c] == '(' or line[c] == None:
not_end = False
else:
save += line[c]
return save
def get_params():
c = 0
saveparams = []
savevalues = ''
while not line[c] == '(':
c += 1
while not line[c] == ')':
c += 1
if line[c] == ',':
saveparams += savevalues
savevalues = ''
else:
savevalues += line[c]
saveparams += savevalues
return saveparams
# decoding
if get_cmd_type() == 'print':
params = get_params()
print(params[0])
for line in script:
debug(line)script.jell:print('hi')
