Makeup v0.5.0 Makeup.Lexer behaviour View Source
A lexer turns raw source code into a list of tokens.
Link to this section Summary
Callbacks
Lexes a string into a list of tokens
Matches groups in a list of tokens
Postprocesses a list of tokens before matching the contained groups
Parses the given string into a parsec
result that inludes a list of tokens
Parses the smallest number of tokens that make sense.
It’s a parsec
Link to this section Callbacks
Link to this callback
lex(arg0, list)
View Source
lex(String.t(), list()) :: [Makeup.Lexer.Types.token()]
Lexes a string into a list of tokens
Link to this callback
match_groups(list)
View Source
match_groups([Makeup.Lexer.Types.token()]) :: [Makeup.Lexer.Types.token()]
Matches groups in a list of tokens.
Link to this callback
postprocess(list, list)
View Source
postprocess([Makeup.Lexer.Types.token()], list()) :: [ Makeup.Lexer.Types.token() ]
Postprocesses a list of tokens before matching the contained groups.
Parses the given string into a parsec
result that inludes a list of tokens.
Link to this callback
root_element(arg0)
View Source
root_element(String.t()) :: Makeup.Lexer.Types.parsec_result()
Parses the smallest number of tokens that make sense.
It’s a parsec
.