hkuplg/fcore

Add support of block comment

Closed this issue · 8 comments

{-
  commenting
  xxx  {-  nested? -}
-}

It should be easy to do.

@linusyang Hi Linus, do you want to tackle this?

@bixuanzju Of course. I think this is also related to the implementation of string interpolation. I may find a solution to both of functions by using start codes of alex. But nested block comment might not be supported.

@linusyang I think string interpolation can be delayed (not that important), having nested block comment is more desirable and easier.

@linusyang It is not necessary to use { and } in block comment, just find another symbol. How about (- and -)?

@zonyitoo All right. But I think they are equivalent in terms of implementation in the lexer.

I'd prefer the Haskell way "{- ... -}" though.

Me, too. String interpolation could use other symbols. Why string interpolation would conflict with nested comments?

@zonyitoo I didn't say that. I mean nested block comments might be a problem.