Keywords true and false get detected as variables. Their AST nodes are ID(name='true') and ID(name='false'). They appear like variables because they are of type ID[^1].
[^1]: Normally we would see something like ID(name='X1') for occurrence of variable X1.
The fix for this is to (1) make a list of reserved C keywords names and (2) ID nodes that have reserved names should be ignored when identifying variables.
Edit: apparently, they are not keywords but macros 🙄 so, maybe that is why true and false get parsed this way.
Keywords
true
andfalse
get detected as variables. Their AST nodes areID(name='true')
andID(name='false')
. They appear like variables because they are of typeID
[^1].[^1]: Normally we would see something like
ID(name='X1')
for occurrence of variableX1
.The fix for this is to (1) make a list of reserved
C keywordsnames and (2) ID nodes that have reserved names should be ignored when identifying variables.Edit: apparently, they are not keywords but macros 🙄 so, maybe that is why
true
andfalse
get parsed this way.