fix: renamed BaseLexer to Lexer and Lexer to RegexLexer to make API nicer

This commit is contained in:
2024-08-31 15:07:05 -03:00
parent 6f797f999a
commit 3ed4a7eab8
3 changed files with 14 additions and 11 deletions

View File

@ -12,7 +12,7 @@ module Tartrazine
def format(text : String, lexer : BaseLexer, io : IO) : Nil
tokenizer = lexer.tokenizer(text)
io << Tartrazine::Lexer.collapse_tokens(tokenizer.to_a).to_json
io << Tartrazine::RegexLexer.collapse_tokens(tokenizer.to_a).to_json
end
end
end