Add support for hexadecimal literals

Resolves #2564