Skip to content

C pragma and Illegal token: else #970

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

Closed
YoEight opened this issue Oct 29, 2015 · 3 comments
Closed

C pragma and Illegal token: else #970

YoEight opened this issue Oct 29, 2015 · 3 comments

Comments

@YoEight
Copy link

YoEight commented Oct 29, 2015

Hi,

{-# LANGUAGE CPP #-}
module Test where

foo :: Int -> Int
#ifdef FOO
foo = succ
#else
foo = pred
#endif

gets me Illegal token: else message when I hit ENTER.

Thanks for your time,
Regards

@gracjan
Copy link
Contributor

gracjan commented Oct 29, 2015

Good use case. Can you provide unit test case for this in tests/haskell-indentation-tests.el?

@Shimuuar
Copy link
Contributor

Shimuuar commented Oct 29, 2015 via email

@gracjan
Copy link
Contributor

gracjan commented Oct 29, 2015

Might be. We might need a couple more. CPP has a couple of features, like line continuations and stuff.

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

3 participants