Sourceror.parse_expression
You're seeing just the function
parse_expression
, go back to Sourceror module for more information.
Specs
Parses a single expression from the given string.
Returns {:ok, quoted, rest}
on success or {:error, source}
on error.
Examples
iex> ~S"""
...> 42
...>
...> :ok
...> """ |> Sourceror.parse_expression()
{:ok, {:__block__, [trailing_comments: [], leading_comments: [],
token: "42", line: 2, column: 1], [42]}, "\n:ok"}
Options
:from_line
- The line at where the parsing should start. Defaults to1
.