timtadh/lexmachine

help!

lucyProgramingLang opened this issue · 1 comments

I have problem with match multi line comment!!
/*
comments
*/

can anyone share the regular expressoion??

The way to correctly lex c-style /* */ comments is given in the tutorial: http://hackthology.com/writing-a-lexer-in-go-with-lexmachine.html

Edit: I should say, it gives the non-nested version. If you need to handle nesting use the "escape hatch" also explained in that article.