class Tartrazine::Lexer
- Tartrazine::Lexer
- Tartrazine::BaseLexer
- Reference
- Object
Overview
This implements a lexer for Pygments RegexLexers as expressed in Chroma's XML serialization.
For explanations on what actions and states do the Pygments documentation is a good place to start. https://pygments.org/docs/lexerdevelopment/
Defined in:
lexer.crConstructors
Class Method Summary
-
.collapse_tokens(tokens : Array(Tartrazine::Token)) : Array(Tartrazine::Token)
Collapse consecutive tokens of the same type for easier comparison and smaller output
Instance methods inherited from class Tartrazine::BaseLexer
config : {name: String, priority: Float64, case_insensitive: Bool, dot_all: Bool, not_multiline: Bool, ensure_nl: Bool}
config,
config=(config : NamedTuple(name: String, priority: Float64, case_insensitive: Bool, dot_all: Bool, not_multiline: Bool, ensure_nl: Bool))
config=,
states : Hash(String, Tartrazine::State)
states,
states=(states : Hash(String, Tartrazine::State))
states=,
tokenizer(text : String, secondary = false) : BaseTokenizer
tokenizer
Constructor Detail
Class Method Detail
Collapse consecutive tokens of the same type for easier comparison and smaller output