o3de / o3de-azslc

Amazon Shader Language (AZSL) Compiler
Other
23 stars 14 forks source link

`uint64_t` literal `ULL` handled incorrectly #49

Closed martinwinter-huawei closed 2 years ago

martinwinter-huawei commented 2 years ago

Using the unsigned long long literal ULL currently does not compile. The following code:

uint64_t test_variable = 1ULL << shift_amount;

will result in the following error message:

syntax error #1: missing ';' at 'L'

Using ULL directly in hlsl code works without an issue using dxc.

martinwinter-huawei commented 2 years ago

This #51 pull request fixes this issue by updating the allowed IntegerSuffixes of the lexer.

martinwinter-huawei commented 2 years ago

Properly fixed in #53

martinwinter-huawei commented 2 years ago

As this has been merged, this issue has been fixed! 👍