Skip to content

Treat ids with double primes correctly (fixes #11)#12

Open
aztek wants to merge 2 commits intotmont:masterfrom
aztek:master
Open

Treat ids with double primes correctly (fixes #11)#12
aztek wants to merge 2 commits intotmont:masterfrom
aztek:master

Conversation

@aztek
Copy link

@aztek aztek commented Nov 26, 2014

Do not highlight identifiers with double primes as character literals in Haskell. The bug seems to be in an extra condition that checks if we are at the beginning of a character literal. The test file for Haskell looks fine after this change.

Do not highlight identifiers with double primes as character literals in Haskell. The bug seems to be in an extra condition that checks if we are at the beginning of a character literal. The test file for Haskell looks fine after this change.
@tmont
Copy link
Owner

tmont commented Dec 1, 2014

Cool! Can you provide a little haskell snippet containing a double prime that we can put in the test file?

Extra code to test identifiers with single quotes in them. Only 'c' should be highlighted as a character literal, the rest are legal identifiers.
@aztek
Copy link
Author

aztek commented Dec 2, 2014

This one should be enough.

c :: Char
c = c'
  where c' = c''
        c'' = c'''
        c''' = c'c'
        c'c' = c'c''
        c'c'' = c''c''
        c''c'' = 'c'

(Apparently, GitHub's syntax highlighter doesn't handle quotes wery well either.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants