21 lines
509 B
Elixir
21 lines
509 B
Elixir
defmodule Localizator.Parser.Base do
|
|
@typedoc """
|
|
Text contents of the file for parse in Map
|
|
"""
|
|
@type contents :: String.t()
|
|
|
|
@typedoc """
|
|
Data in Map format for encoding to text contents of the file
|
|
"""
|
|
@type data :: map
|
|
|
|
@typedoc """
|
|
List of the file extensions for parser
|
|
"""
|
|
@type extensions :: [String.t()]
|
|
|
|
@callback parse(contents) :: {:ok, data} | {:error, any}
|
|
@callback generate(data) :: {:ok, contents} | {:error, any}
|
|
@callback extensions() :: {:ok, extensions}
|
|
end
|