Increase and decrease support operands

This commit is contained in:
Mattia Mascarello 2021-09-29 07:23:49 +02:00 committed by GitHub
parent 4d3de5ff82
commit 4f4cb5fa6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

18
gg.py
View File

@ -22,9 +22,23 @@ try:
elif ag[0]=="SET": elif ag[0]=="SET":
vars[ag[1]]=ag[2] vars[ag[1]]=ag[2]
elif ag[0]=="DEC": elif ag[0]=="DEC":
vars[ag[1]]=int(vars[ag[1]])-1 if len(ag)==3:
if(ag[2].isnumeric());
n=int(ag[2])
else:
n=int(vars[ag[2]])
else:
n = 1
vars[ag[1]]=int(vars[ag[1]])-n
elif ag[0]=="INC": elif ag[0]=="INC":
vars[ag[1]]=int(vars[ag[1]])+1 if len(ag)==3:
if(ag[2].isnumeric());
n=int(ag[2])
else:
n=int(vars[ag[2]])
else:
n = 1
vars[ag[1]]=int(vars[ag[1]])+n
elif ag[0]=="CP": elif ag[0]=="CP":
vars[ag[1]]=vars[ag[2]] vars[ag[1]]=vars[ag[2]]
elif ag[0]=="JLE": elif ag[0]=="JLE":