Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when defining a class in a macro #93

Closed
ConjuringCoffee opened this issue Aug 16, 2023 · 3 comments
Closed

Error when defining a class in a macro #93

ConjuringCoffee opened this issue Aug 16, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ConjuringCoffee
Copy link
Contributor

ConjuringCoffee commented Aug 16, 2023

Hi Jörg-Michael, I've been messing around with macros and found a case that can't be handled by the ABAP Cleaner.

DEFINE define_exception.
  CLASS &1 DEFINITION FOR TESTING INHERITING FROM cx_static_check.
  ENDCLASS.


  CLASS &1 IMPLEMENTATION.
  ENDCLASS.
END-OF-DEFINITION.

The following error is logged:
Parse error in line 5: expected END-OF-DEFINITION, but found CLASS. Opening command (line 3): DEFINE define_exception.

EDIT: I love how even the GitHub syntax highlighting is confused 😄

@ConjuringCoffee
Copy link
Contributor Author

PS: I'm not going to include this in any code that will go to production, so this has low priority for me.

@jmgrassau jmgrassau self-assigned this Sep 2, 2023
@jmgrassau jmgrassau added the bug Something isn't working label Sep 2, 2023
@jmgrassau
Copy link
Member

Hi ConjuringCoffee,

nice finding! Although I regularly run ABAP cleaner on dozens of megabytes of code for testing, I guess this never came up so far, because CLASS was always found on top level. Will be fixed in the next release!

Kind regards,
Jörg-Michael

jmgrassau added a commit to jmgrassau/abap-cleaner that referenced this issue Sep 4, 2023
@jmgrassau
Copy link
Member

Hi ConjuringCoffee,

thanks again for this finding! This should now be fixed with version 1.5.3, which was just released.

Kind regards,
Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants