elif cl == 'var':
if str(compileLines[2]) == '=':
calce = ''
manyD = 0
for i in compileLines:
if str(compileLines[i+3]) == "'": #linia 63
manyD += 1
continue
else:
calce += str(compileLines[i+3])
if manyD == 0 or manyD == 2:
for k in vars.v:
if k[0] == compileLines[1]:
error('2', f'Variable named {str(compileLines[1])} exist!')
break
else:
vars.v.append([str(compileLines[1]), calce])
else:
error('2', 'In Variable, you must use 0 or 2 "\'"')
to kod dla zadeklarowania zmiennej, klasa vars która jest użyta to:
class Variables:
v = []
vars = Variables()
jak odpalam i wpisuje do konsoli powiedzmy var a = 2 to wyskakuje:
Traceback (most recent call last):
File "shell.py", line 91, in <module>
compiler(input("Git => "))
File "shell.py", line 63, in compiler
if str(compileLines[i+3]) == "'":
TypeError: can only concatenate str (not "int") to str
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! git@1.0.1 start: `py shell.py`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git@1.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Maciej\AppData\Roaming\npm-cache\_logs\2020-12-31T08_40_42_612Z-debug.log
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run start" terminated with exit code: 1.
co jest nie tak