Add Roc lexer by shashb27 · Pull Request #3404 · pygments/pygments · GitHub
Skip to content

Add Roc lexer - #3404

Open
shashb27 wants to merge 1 commit into
pygments:masterfrom
shashb27:add-roc-lexer
Open

shashb27 wants to merge 1 commit into
pygments:masterfrom
shashb27:add-roc-lexer

Conversation

@shashb27

Copy link
Copy Markdown

Adds a lexer for Roc, requested in #3364.

It covers the current main syntax: \ interpolation with nested braces, \\\\ block strings, \\u(....) unicode escapes, and/or word operators, the ?/?? postfix operators, .. rest/update patterns and ..= ranges, nominal (:=) and opaque (::) types with .{ } extension blocks, .U8-style number suffixes, and \$-prefixed var names. A lowercase name starting a line is highlighted as a definition.

Tests are five snippets under tests/snippets/roc/ plus Roc's own all-syntax test (from roc-lang/roc's test/echo/all_syntax_test.roc) as an examplefile, so the golden output tracks their syntax reference directly.

On the community bar in the contributing guide: Roc is pre-0.1, but it has a 501(c)(3) foundation, corporate sponsorship, an Exercism track and active editor tooling, and Zulip's markdown renderer is waiting on this for roc code fences (zulip/zulip#40325) - I think it clears the bar.

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

Successfully merging this pull request may close these issues.

1 participant