Gidsss / UwUIDE

A compiler made to be cute uwu >~<
6 stars 0 forks source link

Floor/ceil integer and float literals (chan and kun) #241

Closed Gidsss closed 4 months ago

Gidsss commented 4 months ago

Integer literals

Float literals

Note: Values greater than the given ceiling value will be adjusted to the ceiling value while values less than the floor value will be adjusted to the floor value.

am-cid commented 4 months ago

Solution is to implement a builtin fn that automatically floors/ceils int/float values.

something like to_float() or to_int()

am-cid commented 4 months ago

new solution is to have builtin types so capping values also happens during operations (+, - *, /, %), not just assignments and declarations