Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifiers with double primes are parsed as character literals in Haskell #11

Open
aztek opened this issue Nov 26, 2014 · 0 comments
Open

Comments

@aztek
Copy link

aztek commented Nov 26, 2014

It is quite common in Haskell to name a variable with a single quote at the end (imitating a prime symbol). Double primes (two single quotes at the end) are also common. Sunlight doesn't seem to handle them very well. The following snippet of Haskell code

c'' = 'a'

is displayed as

''' = 'a'

with ''' highlighted as a character literal.

aztek added a commit to aztek/sunlight that referenced this issue 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.
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

No branches or pull requests

1 participant