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
{{ message }}
Repository navigation
Parsing error when code has functional methods as chained statements #91
thanks for reporting this – this is a known limitation: A statement with one opening, but multiple closing parentheses completely contradicts the object model used in ABAP cleaner, and I don't think it would be feasible to rework that object model (allowing multiple closing tokens for the same opening token) just for the sake of these – hopefully rare – statements.
What could be done, however, is to improve the error message for such cases (by specifically checking whether the issue is caused by a chain colon inside of brackets), and ask the user to rework that statement before ABAP cleaner can be used.
The cleanup rule "Remove empty commands" also shows that horrible (but syntactically correct) things can be done with colons and commas…
Activity
jmgrassau commentedon Aug 16, 2023
Hi suynwa,
thanks for reporting this – this is a known limitation: A statement with one opening, but multiple closing parentheses completely contradicts the object model used in ABAP cleaner, and I don't think it would be feasible to rework that object model (allowing multiple closing tokens for the same opening token) just for the sake of these – hopefully rare – statements.
What could be done, however, is to improve the error message for such cases (by specifically checking whether the issue is caused by a chain colon inside of brackets), and ask the user to rework that statement before ABAP cleaner can be used.
The cleanup rule "Remove empty commands" also shows that horrible (but syntactically correct) things can be done with colons and commas…
Kind regards,
Jörg-Michael
jmgrassau commentedon Sep 22, 2023
Hi Suhas,
the next release will now show a more dedicated error message for this case:
Kind regards,
Jörg-Michael
improve Parser error message for chain colon inside parentheses (SAP#91)
improve Parser error message for chain colon inside parentheses (#91)
jmgrassau commentedon Sep 22, 2023
Hi Suhas,
thanks again for bringing this up – version 1.5.4 with the improved error message was just released!
Kind regards,
Jörg-Michael