Integer literals now support signs
This commit is contained in:
6
main.go
6
main.go
@@ -164,7 +164,11 @@ func onPress (button stone.Button, modifiers stone.Modifiers) {
|
||||
case *IntegerLiteral:
|
||||
integer := selectedExpression.(*IntegerLiteral)
|
||||
integer.value *= int64(integer.displayRadix)
|
||||
integer.value += int64(value)
|
||||
if integer.value < 0 {
|
||||
integer.value -= int64(value)
|
||||
} else {
|
||||
integer.value += int64(value)
|
||||
}
|
||||
}
|
||||
|
||||
redraw()
|
||||
|
||||
Reference in New Issue
Block a user