intellij-haskell icon indicating copy to clipboard operation
intellij-haskell copied to clipboard

Feature: introduce variable

Open ishmum123 opened this issue 4 years ago • 17 comments

PR for #414 .

Would appreciate any help or collaboration...

ishmum123 avatar Feb 15 '21 03:02 ishmum123

@ishmum123 thanks for your contribution. But we can only implement this proper when the layout is properly parsed. A start is made in the layout lexer branch but still a lot of work. I also have to rebase master on the branch which is also not trivial.

rikvdkleij avatar Feb 15 '21 18:02 rikvdkleij

@rikvdkleij if you could list out the steps of lexer, I might be able to help. Also I felt the project currently lacks a proper testing pattern. I am willing to help out

ishmum123 avatar Feb 15 '21 18:02 ishmum123

@ishmum123 thanks! Except for the rebase there are no clear steps. It’s a matter of getting the parser in a shape that it will parse Haskell code while individual expressions, where clauses, etc are identifiable on whatever level.

rikvdkleij avatar Feb 15 '21 19:02 rikvdkleij

I am currently trying to Intellij Elm. Does the parsing over there help somehow?

ishmum123 avatar Feb 15 '21 21:02 ishmum123

Yes, the Elm plugin solution helped us for the solution in the layoutlexer branch. To continue I have to rebase that branch on master.

rikvdkleij avatar Feb 16 '21 06:02 rikvdkleij

I am trying to rebase the branch locally. Working incrementally at the moment, i.e. - rebasing a few commits at a time until I hit a commit with high number of conflicts. Might take some time...

ishmum123 avatar Feb 16 '21 13:02 ishmum123

@ishmum123 don’t know if you’re still trying to rebase but you can ignore the conflicts of files inside the gen folder and HaskellParser.java because those are generated. If not then I will give it a try again 😄

rikvdkleij avatar Feb 21 '21 18:02 rikvdkleij

I was out of town for a while... I would start working on it today, God willing

ishmum123 avatar Feb 22 '21 01:02 ishmum123

This is my take on it - #646 . Feel free to completely discard it if it causes more harm than good

ishmum123 avatar Feb 23 '21 02:02 ishmum123

@ishmum123 thanks! I will take a look soon

rikvdkleij avatar Feb 23 '21 05:02 rikvdkleij

@ishmum123 it looks okay. Had to make some small changes and regenerate the parser code to get it compiled.

The HaskellParsingTest is failing because of different element for newline.

rikvdkleij avatar Feb 27 '21 17:02 rikvdkleij

@rikvdkleij can you please push your changes to the branch? I can look into the HaskellParsingTest on top of that?

ishmum123 avatar Feb 28 '21 00:02 ishmum123

@ishmum123 I’ve pushed my changes to your branch already. It’s a PR

Thanks but be aware that the new PSI tree still has to be defined by us.

rikvdkleij avatar Feb 28 '21 06:02 rikvdkleij

@rikvdkleij let's carry the discussion over to the other PR?

ishmum123 avatar Mar 03 '21 01:03 ishmum123

@ishmum123 yes, good idea

rikvdkleij avatar Mar 04 '21 05:03 rikvdkleij

@rikvdkleij left a comment there. Would be great if you could address that please

ishmum123 avatar Mar 06 '21 00:03 ishmum123

2 year later, ouch!

CodeByAidan avatar Jun 13 '23 23:06 CodeByAidan