11defmodule 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