You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool would make a mistake and detect the 5th line (i.e. the line where the last "else" is) as an INDENTATION atom, since it does not align with the if statement it follows. However, in reality, it should consider the position of the closed square bracket in the begining of the line 5.
Proposed solution:
When detecting INDENTATION atom in an "if else" context, first check the parent context to see whether the parent context is an "if else" context. If so, change the starting index in the 'if else' block currently being analyzed to the ending index of the parent block. In the example above, the starting index of the "if(Y)" would be changed to the ending index of the first "if(X)".
The text was updated successfully, but these errors were encountered:
AlbertSGS
added a commit
to AlbertSGS/atoms-of-confusion-detector
that referenced
this issue
May 2, 2023
Issue Description:
Consider the following snippet of code:
The tool would make a mistake and detect the 5th line (i.e. the line where the last "else" is) as an INDENTATION atom, since it does not align with the if statement it follows. However, in reality, it should consider the position of the closed square bracket in the begining of the line 5.
Proposed solution:
When detecting INDENTATION atom in an "if else" context, first check the parent context to see whether the parent context is an "if else" context. If so, change the starting index in the 'if else' block currently being analyzed to the ending index of the parent block. In the example above, the starting index of the "if(Y)" would be changed to the ending index of the first "if(X)".
The text was updated successfully, but these errors were encountered: