Current section
Files
Jump to
Current section
Files
lib/eyeon/symbol_token.ex
defmodule Eyeon.SymbolToken do
@moduledoc """
A symbol token carrying its text and the import location it was resolved from.
"""
defstruct text: "", location: %Eyeon.ImportLocation{}
@type t :: %__MODULE__{text: String.t(), location: Eyeon.ImportLocation.t()}
def left == right do
case {left, right} do
{%__MODULE__{text: "", location: left}, %__MODULE__{text: "", location: right}} ->
Kernel.==(left, right)
{%__MODULE__{text: left}, %__MODULE__{text: right}} ->
Kernel.==(left, right)
end
end
end