o3de / o3de-azslc

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

Allow proper parsing of unsigned long long literal ULL #51

Closed martinwinter-huawei closed 2 years ago

martinwinter-huawei commented 2 years ago

Signed-off-by: Martin Winter martin.winter@huawei.com

While hlsl supports 64 bit unsigned integer types (i.e. uint64_t), using the correct literal suffix ULL leads to a parsing error. So code like this

uint64_t test_variable = 1ULL << 35;

will not compile and the error message typically is

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

This commit updates the lexer definition to define ULL or ull as a valid IntergerSuffix.

martinwinter-huawei commented 2 years ago

Superseded by #53