lytlang/lib/parser.ex

11 lines
255 B
Elixir
Raw Normal View History

2019-06-16 00:55:27 -05:00
defmodule Lytlang.Parser do
@doc """
Attempts to tokenize an input string to start_tag, end_tag, and char
"""
@spec parse(binary) :: list
def parse(input) do
{:ok, tokens, _} = input |> to_char_list |> :lytlang.string()
tokens
end
end