rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Add lexer for IEC 61131-3 Structured Text #2027

Closed tali closed 1 month ago

tali commented 4 months ago

The new lexer uses sets of keywords to quickly categorize names and uses regular expressions for other elements like numbers and punctuation.

Closes #2024

tali commented 4 months ago

This is still in draft, I'd still like to work on disambiguation and include better example code. I already created this PR to be able to obtain some feedback about the current state. Especially feedback from smalltalk experts would be helpful for disambiguation of *.st files. Ruby is not my native language, so please also have a closer look that I did everything right.

tali commented 3 months ago

(just rebased to current master)

bufferoverflow commented 2 months ago

@tali I really like this addition! I guess this is no longer draft and ready for maintainer review?

tali commented 2 months ago

This code passes all my tests and is able to highlight our production code. From my side it is ready. @jneen, @gfx, what do you think? Can we merge it?

tali commented 2 months ago

Hi @tancnle, can you have a look please? I'd like to get this into the next release so that we can use it in our company GitLab.

bufferoverflow commented 1 month ago

@dblessing could you maybe review this? Would be a great addition to GitLab!

tancnle commented 1 month ago

@tali @bufferoverflow I will have a look at it sometime today.

tancnle commented 1 month ago

Thanks, @tali. LGTM 🚀