Pearl – An Erlang lexer and syntax highlighter in Gleam
Pearl An Erlang lexer and syntax highlighter for Gleam! Pearl is a lexer and syntax highlighter for Erlang, written in Gleam. The lexer is based on glexer and just , allowing you to convert Erlang source code into tokens. There is also an API which allows you to highlight Erlang code using ansi colours, html or a custom format. Heavily inspired by contour . gleam add pearl@2 import pearl pub fn main ( ) { let code = " -module(hello). -export([hello_world/0]). hello_world() -> io:fwrite( \" H