Skip to content

Commit 6236676

Browse files
Premwoikerszcz
andauthored
Apply doc suggestions from code review
Co-authored-by: Radek Szymczyszyn <radoslaw.szymczyszyn@erlang-solutions.com>
1 parent b925786 commit 6236676

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/gradient/elixir_type.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule Gradient.ElixirType do
77
"""
88

99
@doc """
10-
Take type and prepare pretty string represntation.
10+
Take type and prepare a pretty string representation.
1111
"""
1212
@spec pretty_print(tuple()) :: String.t()
1313
def pretty_print({:remote_type, _, [{:atom, _, mod}, {:atom, _, type}, args]}) do

lib/gradient/tokens.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
defmodule Gradient.Tokens do
22
@moduledoc """
3-
Group of functions helping with manage tokens.
3+
Functions useful for token management.
44
"""
55
alias Gradient.Types, as: T
66

77
@doc """
8-
Drop tokens to the first conditional occurance. Returns type of the encountered
9-
conditional and following tokens.
8+
Drop tokens to the first conditional occurrence. Returns type of the encountered
9+
conditional and the following tokens.
1010
"""
1111
@spec get_conditional(T.tokens(), integer(), T.options()) ::
1212
{:case, T.tokens()}
@@ -33,7 +33,7 @@ defmodule Gradient.Tokens do
3333

3434
@doc """
3535
Drop tokens to the first list occurance. Returns type of the encountered
36-
list and following tokens.
36+
list and the following tokens.
3737
"""
3838
@spec get_list(T.tokens(), T.options()) ::
3939
{:list, T.tokens()} | {:keyword, T.tokens()} | {:charlist, T.tokens()} | :undefined
@@ -58,8 +58,8 @@ defmodule Gradient.Tokens do
5858
end
5959

6060
@doc """
61-
Drop tokens to the first tuple occurance. Returns type of the encountered
62-
list and following tokens.
61+
Drop tokens to the first tuple occurrence. Returns type of the encountered
62+
list and the following tokens.
6363
"""
6464
@spec get_tuple(T.tokens(), T.options()) ::
6565
{:tuple, T.tokens()} | :undefined
@@ -105,7 +105,7 @@ defmodule Gradient.Tokens do
105105
end
106106

107107
@doc """
108-
Drop tokens while the token's line is lower than given location.
108+
Drop tokens while the token's line is lower than the given location.
109109
"""
110110
@spec drop_tokens_to_line(T.tokens(), integer()) :: T.tokens()
111111
def drop_tokens_to_line(tokens, line) do
@@ -128,8 +128,8 @@ defmodule Gradient.Tokens do
128128

129129
@doc """
130130
Drop the tokens to binary occurrence and then collect all belonging tokens.
131-
Return tuple where first element is a list of tokens making binary, and second
132-
element is a list of tokens after binary.
131+
Return tuple where the first element is a list of tokens making up the binary, and the second
132+
element is a list of tokens after the binary.
133133
"""
134134
@spec cut_tokens_to_bin(T.tokens(), integer()) :: {T.tokens(), T.tokens()}
135135
def cut_tokens_to_bin(tokens, line) do

0 commit comments

Comments
 (0)