Eden.Lexer (eden v2.1.0)
A module that implements a lexer for the edn format through its
only function tokenize/1.
Link to this section Summary
Functions
Takes a string and returns a list of tokens.
Link to this section Functions
Link to this function
tokenize(input, opts \\ [location: false])
Takes a string and returns a list of tokens.
Options:
:location- abooleanthat determines wether the location information should be included with each token. Lines are one-based and columns are zero-based. The default value for:locationisfalse.
Examples
iex> Eden.Lexer.tokenize("nil")
[%Eden.Lexer.Token{type: nil, value: "nil"}]
iex> Eden.Lexer.tokenize("nil", location: true)
[%Eden.Lexer.Token{location: %{col: 0, line: 1}, type: nil, value: "nil"}]