JetBrains-NASM-Language icon indicating copy to clipboard operation
JetBrains-NASM-Language copied to clipboard

[Lex] - Assume `%if 0` followed by `%endif` is a comment

Open harm-smits opened this issue 5 years ago • 1 comments

It is common practice to use %if 0 along with %endif to make block comments in NASM. Do you recon its feasible to add support for this? Wouldn't seem more than adjusting the NASMCommenter.java file:

https://github.com/ajkhoury/JetBrains-NASM-Language/blob/f4c3a8f0059aea8bd4a419a2045911f940d0d3ed/src/com/nasmlanguage/NASMCommenter.java#L35

harm-smits avatar Feb 17 '20 19:02 harm-smits

This turns out to be more difficult than originally thought. I think I'm going to have to adjust the language flex to track %if 0 along with %endif blocks since %if is matched as a preprocessor rule in the language BNF.

ajkhoury avatar Mar 22 '20 14:03 ajkhoury