tylerlong / google-code-prettify

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

Haskell identifies #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open this URL:
<http://code.google.com/p/omega/source/browse/branches/llvm-gen/GenLLVM.hs?r=86#
78>
2. look at the selected line
3. it appears starnge

(Please include HTML, not just your source code)

What is the expected output?  What do you see instead?

In Haskell the apostrophe character can be tacked behind identifiers,
like

a' = 42;
b'' = 25;

Your highlighting code does not seem to cope with this :-(
and treats it like the start of a literal character constant.

What version are you using?  On what browser?
the version in google hosting, see
<http://code.google.com/p/support/issues/detail?id=709>

Safari 3.0 browser.

Original issue reported on code.google.com by ggr...@gmail.com on 5 Feb 2008 at 6:18

GoogleCodeExporter commented 9 years ago
the subject should be

"Haskell identifiers with apostrophe highlighted wrongly"

but I pressed the return key before that.

Original comment by ggr...@gmail.com on 5 Feb 2008 at 6:20

GoogleCodeExporter commented 9 years ago
also, the "--"-style comments are not recognized.
these are similar to the C++ "//"-style comments, but must be preceded by a 
blank

feel free to contact me about the exact rules

Original comment by ggr...@gmail.com on 7 Feb 2008 at 11:39

GoogleCodeExporter commented 9 years ago
might be related to issue-25

Original comment by ggr...@gmail.com on 7 Feb 2008 at 11:59

GoogleCodeExporter commented 9 years ago
grammar at http://www.haskell.org/onlinereport/lexemes.html

Original comment by mikesamuel@gmail.com on 23 Apr 2008 at 5:53

GoogleCodeExporter commented 9 years ago
Is haskell's lexical grammar similar enough to LISP's that the new lisp mode at
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#is
sue42
would work as a basis?

Original comment by mikesamuel@gmail.com on 6 Jul 2008 at 12:03

GoogleCodeExporter commented 9 years ago
Unfortunately not, Haskell has a more complicated syntax, as
it is indentation dependent (with offside rule) resembling Python,
and not easy to parse.

But the bug itself is easy to fix IMHO :-)

Original comment by ggr...@gmail.com on 9 Jul 2008 at 7:16

GoogleCodeExporter commented 9 years ago
@r55

Added src/lang-hs.js and tests.

Original comment by mikesamuel@gmail.com on 6 Jan 2009 at 5:58