euphoria/colorize does not deal with nested long comments
- Posted by ArthurCrump May 14, 2014
- 1673 views
Long comments, beginning /^ and ending */, can be nested. The interpreter handles them properly, but using last_multiline_token with the routine colorize() in euphoria/syncolor.e terminates a nested long comment, beginning /*.../*, at the first */. For example:
/* long comment puts(1, "This is inside a comment, so it should not be printed.\n") /* nested puts(1, "This inside a nested long comment, so it should not be printed.\n") */ puts(1, "Still inside a single level of long comment, so it should not be printed.\n") */ puts(1, "This should be the first output from the program.\n")
Executing the above code shows that nested comments work in Euphoria v4.0.5 using the colouring routines from v4.1.0 -
(after changing sizeof(C_POINTER) to 4).
Having previewed, I see that it doesn't show the correct colours in the forum either!
Should this be a ticket?
Arthur