From: Sean Carley Date: 2001-07-05T22:09:06+09:00 Subject: [ruby-talk:17291] Re: /* */ comments From: "Guy N. Hurst" > This made me realize that we may not be able to (easily) have > nested comments without resorting to a second pass. There are > a number of scenarios I can think of that would complicate things. I don't think these situations should be too difficult to handle. > # this is a comment > a = 5 > /* > and this is > a grouping of > /* more comments > */ > b = "will this be evaluated?" If we are nesting comments, the last line would not be evaluated and there would be a parse error if the script ended without closing the first /*. > /* > =begin > what about this? > Am I RD or a comment? > */ > =end # error or not? I would expect /* (/# better) to have a higher precedence than =begin, but even if they have the same precedence, it should be incorrect to cross comment blocks. Either =begin should be ignored because it is inside /* */ and we should have an error on =end, or =begin should start a new comment block and we should have an error on the */ due to incorrect comment block closure. Either way, /* =begin */ =end should not be a valid token order. Neither should =begin /* =end */. Of course this is still my personal opinion. Sean Carley