You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
Currently input is considered part of expression function (which makes sense) but when it loses its identity when opcodes are created. For example:-
The simc line - var a = input("Enter a number: ", "i"), produces the opcode - OpCode('var_assign', 'a---Enter a number: ---i', 'int').
If we could add the input to either the type or the value then it would make more sense. It would also help in check_include function in compiler.py which includes stdio.h for inputs, it does so by checking if an opcode's value is split by --- and has a length of 3 or more then it will be an input statement, though this is true for the current implementation but might break in future versions so adding some sense of input to the opcode generated by the parser would help in this step too.
There are minor changes in the compiler loop too.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
Currently input is considered part of expression function (which makes sense) but when it loses its identity when opcodes are created. For example:-
The simc line -
var a = input("Enter a number: ", "i")
, produces the opcode -OpCode('var_assign', 'a---Enter a number: ---i', 'int')
.If we could add the input to either the type or the value then it would make more sense. It would also help in check_include function in compiler.py which includes stdio.h for inputs, it does so by checking if an opcode's value is split by --- and has a length of 3 or more then it will be an input statement, though this is true for the current implementation but might break in future versions so adding some sense of input to the opcode generated by the parser would help in this step too.
There are minor changes in the compiler loop too.
The text was updated successfully, but these errors were encountered: