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

Add lexer for IEC 61131-3 Structured Text #2027

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

tali
Copy link
Contributor

@tali tali commented Feb 21, 2024

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
Copy link
Contributor Author

tali commented Feb 21, 2024

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 tali marked this pull request as ready for review March 3, 2024 22:41
@tali tali force-pushed the master branch 2 times, most recently from 1ebfe1f to 99fe27d Compare March 18, 2024 15:42
@tali
Copy link
Contributor Author

tali commented Mar 18, 2024

(just rebased to current master)

@bufferoverflow
Copy link

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

@tali
Copy link
Contributor Author

tali commented Apr 15, 2024

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
Copy link
Contributor Author

tali commented May 2, 2024

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
Copy link

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

@tancnle
Copy link
Collaborator

tancnle commented May 12, 2024

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

@tancnle tancnle self-assigned this May 12, 2024
@tancnle tancnle added the needs-review The PR needs to be reviewed label May 12, 2024
lib/rouge/lexers/iecst.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/iecst.rb Outdated Show resolved Hide resolved
The new lexer uses sets of keywords to quickly categorize names and uses
regular expressions for other elements like numbers and punctuation.
@tancnle
Copy link
Collaborator

tancnle commented May 13, 2024

Thanks, @tali. LGTM 🚀

@tancnle tancnle added this pull request to the merge queue May 13, 2024
Merged via the queue into rouge-ruby:master with commit 1ab0290 May 13, 2024
8 checks passed
brandonb927 pushed a commit to brandonb927/brandonb-sites that referenced this pull request Jul 25, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rouge](http://rouge.jneen.net/) ([source](https://github.com/rouge-ruby/rouge), [changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)) | minor | `4.2.1` -> `4.3.0` |

---

### Release Notes

<details>
<summary>rouge-ruby/rouge (rouge)</summary>

### [`v4.3.0`](https://github.com/rouge-ruby/rouge/blob/HEAD/CHANGELOG.md#version-430-2024-06-14)

[Compare Source](rouge-ruby/rouge@v4.2.1...v4.3.0)

[Comparison with the previous version](rouge-ruby/rouge@v4.2.1...v4.3.0)

\_ General

-   Align the base-16 default dark colour palette ([#&#8203;2040](rouge-ruby/rouge#2040) by Tan Le)
-   Brainfuck Lexer
    -   Add "bf" as an alias for brainfuck ([#&#8203;2038](rouge-ruby/rouge#2038) by Boris Verkhovskiy)
-   Eiffel Lexer
    -   Add some unicode operators in Eiffel ([#&#8203;2048](rouge-ruby/rouge#2048) by Ilgiz Mustafin)
-   HCL Lexer
    -   Add Operator support to the HCL Lexer ([#&#8203;2047](rouge-ruby/rouge#2047) by Simon Heather)
-   IecST Lexer (**NEW**)
    -   Add lexer for IEC 61131-3 Structured Text ([#&#8203;2027](rouge-ruby/rouge#2027) by Martin Waitz)
-   JavaScript & TypeScript Lexer
    -   Adding type operators satisfies and as ([#&#8203;2014](rouge-ruby/rouge#2014) by Evan R)
-   Markdown Lexer
    -   Support bold and italics at the same time ([#&#8203;2053](rouge-ruby/rouge#2053) by Tan Le)
-   Mathematica Lexer
    -   Add "wolfram" as an alias for Mathematica ([#&#8203;2042](rouge-ruby/rouge#2042) by Boris Verkhovskiy)
-   Objective-C Lexer
    -   Add "objective-c" as an alias for Objective-C ([#&#8203;2037](rouge-ruby/rouge#2037) by Boris Verkhovskiy)
-   Ruby & Crystal Lexer
    -   Add Ruby and Crystal unicode samples ([#&#8203;2036](rouge-ruby/rouge#2036) by Tan Le)
    -   Fix non-ascii characters in names in Crystal and Ruby ([#&#8203;1894](rouge-ruby/rouge#1894) by Kolesár András)
-   TCL Lexer
    -   Fix comment highlight in TCL lexer ([#&#8203;2041](rouge-ruby/rouge#2041) by Tan Le)
-   TOML Lexer
    -   toml: support all date formats ([#&#8203;2033](rouge-ruby/rouge#2033) by Martin Tournoij)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.brandonb.ca/brandon/personal-sites/pulls/8
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review The PR needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for IEC 61131-3 Structured Text
3 participants