Sourceror.get_end_position
You're seeing just the function
get_end_position
, go back to Sourceror module for more information.
Specs
Returns the end position of the quoted expression. It recursively checks for
end
, closing
and end_of_expression
positions. If none is found, the
default value is returned(defaults to [line: 1, column: 1]
).
iex> quoted = ~S"""
...> A.{
...> B
...> }
...> """ |> Sourceror.parse_string!()
iex> Sourceror.get_end_position(quoted)
[line: 3, column: 1]
iex> quoted = ~S"""
...> foo do
...> :ok
...> end
...> """ |> Sourceror.parse_string!()
iex> Sourceror.get_end_position(quoted)
[line: 3, column: 1]
iex> quoted = ~S"""
...> foo(
...> :a,
...> :b
...> )
...> """ |> Sourceror.parse_string!()
iex> Sourceror.get_end_position(quoted)
[line: 4, column: 4]