Add support for hexadecimal literals

Resolves #2564
Merge pull request #2566 from cleishm/hexadecimal-literals

Add support for hexadecimal literals