An Erlang lexer and syntax highlighter in Gleam

Changelog#

v2.2.0 - 2025-11-04#

  • Updated the JavaScript FFI code to use the new API.

  • pearl now requires Gleam v1.13 or higher.

v2.1.0 - 2025-09-01#

  • Improved the performance of lexing comments and escape sequences.

v2.0.0 - 2025-08-22#

  • Merged the pearl/token and pearl/highlight modules into one pearl module.

  • Renamed several variants and functions to prevent name clashes.

    • pearl/token.to_source -> pearl.token_to_source
    • pearl.UnterminatedAtom -> pearl.UnterminatedQuotedAtom
    • pearl.UnterminatedString -> pearl.UnterminatedStringLiteral
    • pearl/highlight.tokens -> pearl.highlight_tokens
    • pearl/highlight.ansi -> pearl.highlight_ansi
    • pearl/highlight.html -> pearl.highlight_html
    • pearl/highlight.{type Token} -> pearl.HighlightToken
  • Added the stringify_error function.

v1.0.0 - 2025-08-21#

  • Initial release.