summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2023-05-06 01:49:36 +0200
committerCarlos Maniero <carlos@maniero.me>2023-05-06 12:35:06 -0300
commit6a297e0ef57f2ae6d6134bd44a33c55fa9628cfe (patch)
tree93720e9db194e45822e588cf6b1dc9d45e13d464 /src/parser.h
parent100d9b6c128e47c76dcc86811e89ae07e9b54dbd (diff)
cli: Fix bitwise handling on --ast-dump
In C, literal integers default to a 32-bit size for arithmetic operations. Unfortunately, this was causing incorrect values to be assigned to our uint64_t variables, leading to unexpected behavior. To resolve this issue, we have updated our code to explicitly set the literal size using the "ULL" suffix (unsigned long long). It's important to note that this implementation has a limitation of 64 levels of indentation. Beyond this point, we may encounter a 64-bit overflow. However, at present, we don't anticipate the need to visualize trees that exceed this depth. If this requirement arises in the future, we can explore solutions like dynamically creating new numbers to accommodate larger tree sizes. Overall, this change ensures that our code is functioning correctly and improves the reliability of our codebase. Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
Diffstat (limited to 'src/parser.h')
0 files changed, 0 insertions, 0 deletions