pvl / abap.tmbundle

TextMate support for ABAP
20 stars 9 forks source link

Comma breaks keyword highlighting in chained declarations #32

Closed FreHu closed 5 years ago

FreHu commented 6 years ago

code_2018-10-09_13-49-40

larshp commented 6 years ago

ABAP is a difficult language from a parsing perspective 😄

FreHu commented 6 years ago

Yeah, so many syntax variations for everything. I asked about a reference grammar, but apparently there is none, just bits you can get from the keyword documentation.

larshp commented 6 years ago

I've made this: https://larshp.github.io/abaplint/viz/ but it is not complete and contains lots of wrong stuff

FreHu commented 6 years ago

That's actually super cool, but I'll probably never get to doing individual keyword syntaxes. Even #29 will probably take significant effort since the grammar mostly just does "if it can be a keyword, make it a keyword".

I'd be happy if at least the more modern ABAP was correctly highlighted - it is probably 99% of ABAP code which will ever make it into a git repository. On the other side, it wouldn't be useless as there are benefits to versioning legacy code as well (not as much incentive by its developers though).

Have you ever looked into implementing a language server protocol for ABAP? It seems to be very reusable and would allow for some major stuff like goto definition or find references across editors and in github sources as well.

larshp commented 6 years ago

langserver: yes, I'm heading in that direction with abaplint 😄 it is just a lot of work, getting the railroad diagrams is difficult, building ASTs, integrating it into VS Code, lots of things to do, and I suck at writing parsers and doing TypeScript.

But it will get there, first step is implementing the linting part as an extension in VS Code, I just keep getting distracted with other missing features

larshp commented 6 years ago

@FreHu published, https://marketplace.visualstudio.com/items?itemName=larshp.vscode-abaplint

FreHu commented 6 years ago

Downloaded. You should add some icons for free style points, your extensions will be among the first alphabetically.

code_2018-10-20_11-28-13

larshp commented 6 years ago

yeah, but I dont feel very artistic, also icon for https://github.com/abaplint is crap 💩