add support for more integer types in literals and move formatting to dedicated class