Nested comments grammar/lexer #538
Replies: 2 comments 3 replies
-
You could try playing with the existing Perhaps something like (e.g.
) |
Beta Was this translation helpful? Give feedback.
-
OK. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'd like to define a lexer which would recognize "nested comments" or "nested conditional sequences". Suppose having C code (in a .c or .cpp file):
How should I define the lexer (grammar) to be able to recognize text "This is a comment." as a comment and to apply a style (e.g. italics) for that? I made some attempts but no success...
TIA.
Beta Was this translation helpful? Give feedback.
All reactions