Skip to content

Commit

Permalink
[ErlyORM#18] Fix @elvisci warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Brujo Benavides committed Jan 14, 2016
1 parent f4d57d0 commit 14b1ff1
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/aleppo.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
% Aleppo: ALternative Erlang Pre-ProcessOr
-module(aleppo).
-export([process_file/1, process_file/2, process_tokens/1, process_tokens/2, scan_file/1]).
-export([process_file/1, process_file/2, process_tokens/1, process_tokens/2,
scan_file/1]).

-record(ale_context, {
include_trail = [],
Expand All @@ -15,7 +16,8 @@ process_file(FileName, Options) ->
ModuleName = list_to_atom(filename:rootname(filename:basename(FileName))),
case scan_file(FileName) of
{ok, Tokens} ->
process_tokens(Tokens, [{file, FileName}, {module, ModuleName}|Options]);
process_tokens(
Tokens, [{file, FileName}, {module, ModuleName}|Options]);
Error ->
Error
end.
Expand Down Expand Up @@ -451,11 +453,15 @@ reverse_and_normalize_token_locations(RevTokens) ->

reverse_and_normalize_token_locations_helper([], Acc) ->
Acc;
reverse_and_normalize_token_locations_helper([{Type, MaybeLocation} | Rest], Acc) when is_tuple(MaybeLocation) orelse
is_list(MaybeLocation) ->
reverse_and_normalize_token_locations_helper(Rest, [{Type, location(MaybeLocation)}|Acc]);
reverse_and_normalize_token_locations_helper([{Type, MaybeLocation, Extra} | Rest], Acc) when is_tuple(MaybeLocation) orelse
is_list(MaybeLocation) ->
reverse_and_normalize_token_locations_helper(Rest, [{Type, location(MaybeLocation), Extra}|Acc]);
reverse_and_normalize_token_locations_helper(
[{Type, MaybeLocation} | Rest], Acc)
when is_tuple(MaybeLocation) orelse is_list(MaybeLocation) ->
reverse_and_normalize_token_locations_helper(
Rest, [{Type, location(MaybeLocation)}|Acc]);
reverse_and_normalize_token_locations_helper(
[{Type, MaybeLocation, Extra} | Rest], Acc)
when is_tuple(MaybeLocation) orelse is_list(MaybeLocation) ->
reverse_and_normalize_token_locations_helper(
Rest, [{Type, location(MaybeLocation), Extra}|Acc]);
reverse_and_normalize_token_locations_helper([Other | Rest], Acc) ->
reverse_and_normalize_token_locations_helper(Rest, [Other | Acc]).

0 comments on commit 14b1ff1

Please sign in to comment.