In chpldocing IO.chpl, I needed to describe the %/*/ format string, which unfortunately has a nested comment start in it. For the documentation for the release, I just put %/ * / and then added a comment that the spaces were to be removed.
I thought it might be fun to modify the Chapel lexer to allow comments to be delimited by a pattern with more stars, like /** **/ so that /** /*/ **/ does not have a problem, since the inner /* (or */ for that matter) are not interpreted as comment start or end. So I did that just to see if I could get it working. I'm quite aware that this is a language change that needs to be discussed before the patch can be accepted. My patch does not change the handling of comments like /**/ or /***/ or /****/ etc. There are lots of such comments and I wouldn't want to make that illegal... Lastly, since we're leaning more on the comment syntax for chpldoc'ing, I think it makes sense to have comment delimiters that are less likely to occur in the comment string, and to have a couple of options there in case something comes up. Any thoughts on this change? A good idea? A bad one? Thanks, -michael P.S. In case you want to play with the patch, you'll have to make parser in compiler/parser to get it to actually work (I wanted the pull request to show only the real changes). See https://github.com/chapel-lang/chapel/pull/1737 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Chapel-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-developers
