S swaps sign of literal, shift + s swaps sign mode of readout

This commit is contained in:
Sasha Koshka 2022-11-22 01:21:19 -05:00
parent 776856a6a5
commit 729ea8d48d
1 changed files with 10 additions and 0 deletions

10
main.go
View File

@ -213,6 +213,16 @@ func onPress (button stone.Button, modifiers stone.Modifiers) {
application.Draw()
case 's':
switch selectedExpression.(type) {
case *IntegerLiteral:
integer := selectedExpression.(*IntegerLiteral)
integer.value *= -1
}
redraw()
application.Draw()
case 'S':
showSigned = !showSigned
redraw()
application.Draw()