doddoreul / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Haskell comment not properly highlighted #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. open
<http://code.google.com/p/omega/source/browse/trunk/src/LangEval.hs?spec=svn196&
r=145#213>
2. look at line 213 (marked). It is not highlighted as comment.

What is the expected output?  What do you see instead?
Comment line highlighted as normal code. Should be red.

What version are you using?  On what browser?
Today's running version on google code, Safari 3.1

Original issue reported on code.google.com by ggr...@gmail.com on 11 Feb 2009 at 11:39

GoogleCodeExporter commented 8 years ago
correction, my Safari is 3.2.1.

Original comment by ggr...@gmail.com on 12 Feb 2009 at 2:09

GoogleCodeExporter commented 8 years ago
Looks like
  -- bind x (\ z -> case z of { p -> cont; _ -> fail "matcherr"})
is failing to match the haskell comment pattern.

The comment says 
         // Haskell does not have a regular lexical grammar due to the nested
         // ncomment.
         // comment      ->    dashes [ any<symbol> {any}] newline
         // ncomment     ->    opencom ANYseq {ncomment ANYseq}closecom
         // dashes       ->    '--' {'-'}
         // opencom      ->    '{-'
         // closecom     ->    '-}'

I think I was just confused by the ncomment production when writing the ncomment
production since comment seems to allow '{' and '}' to be contained.

Original comment by mikesamuel@gmail.com on 19 May 2009 at 5:20

GoogleCodeExporter commented 8 years ago
Fixed at revision 73.  Will include this in the next minified version I release 
soonish.

Original comment by mikesamuel@gmail.com on 19 May 2009 at 5:26