Skip to content

Commit

Permalink
[#74] Fix #74 by upgrading katana-code
Browse files Browse the repository at this point in the history
  • Loading branch information
elbrujohalcon committed Nov 19, 2020
1 parent 9395b9b commit 56e1e2a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{minimum_otp_vsn, "21"}.

{deps, [{katana_code, "0.2.1"}]}.
{deps, [{katana_code, "1.0.1"}]}.

{project_plugins, [rebar3_lint, rebar3_hex]}.

Expand Down
6 changes: 3 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{"1.2.0",
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"0.2.1">>},0}]}.
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"1.0.1">>},0}]}.
[
{pkg_hash,[
{<<"katana_code">>, <<"B2195859DF57D8BEBF619A9FD3327CD7D01563A98417156D0F4C5FAB435F2630">>}]},
{<<"katana_code">>, <<"CB5BA824CAB1B14A4C101D58F353C72AEFAD3B050F9619C6A8359534641255A6">>}]},
{pkg_hash_ext,[
{<<"katana_code">>, <<"8448AD3F56D9814F98A28BE650F7191BDD506575E345CC16D586660B10F6E992">>}]}
{<<"katana_code">>, <<"79DF283EC5FEC476C7C98B73DCC8B3CF43DAC9769EC49EF4E74B6FC65629A8C7">>}]}
].
11 changes: 10 additions & 1 deletion test_app/after/src/macros.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,13 @@ another_hidden_function() ->
-define(NO_ARGS(), result).
-define(NO_PARENS, no_parens).

other_function ( ? NO_ARGS ( ) , ? NO_PARENS , ? WITH_ARGS ( X ) , ? WITH_ARGS ( ? WITH_ARGS ( ? NO_ARGS ( ) ) ) ) -> { ? NO_ARGS ( ) , ? NO_PARENS , X } .
other_function(?NO_ARGS(), ?NO_PARENS, ?WITH_ARGS(X), ?WITH_ARGS(?WITH_ARGS(?NO_ARGS()))) -> {?NO_ARGS(), ?NO_PARENS, X}.


%% Careful with parentheses
-define(Now(), 100).

-define(Elapsed(Since), (?Now()-Since)).


-define(Remains(Since, Remaining), N-?Elapsed(Since)).
2 changes: 1 addition & 1 deletion test_app/after/src/others.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
strange_infix_operators(A, B) ->
bnot (-(A rem B)).

-define(OUT_OF_CONTEXT_CLAUSE, true -> false ).
-define(OUT_OF_CONTEXT_CLAUSE, true -> false).

-record(rec, {key, value}).

Expand Down
4 changes: 2 additions & 2 deletions test_app/after/src/syntax_tools_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
% -?attrib([foo2/2]).

-define(macro_simple1, ok).
-define(MACRO_SIMPLE2, other).
-define(MACRO_SIMPLE2, (other)).
-define(macro_simple3, ?MODULE).
-define(macro_simple4, [?macro_simple3, ?MODULE, ?MACRO_SIMPLE2]).
-define(macro_simple5, process_info).
-define(macro_simple5, (process_info)).
-define(macro_string, "hello world").
-define(macro_argument1(X), X + 3).
-define(macro_argument2(X, Y), X + 3 * Y).
Expand Down
4 changes: 4 additions & 0 deletions test_app/src/macros.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ another_hidden_function() ->
other_function(?NO_ARGS(), ?NO_PARENS, ?WITH_ARGS(X), ?WITH_ARGS(?WITH_ARGS(?NO_ARGS()))) ->
{?NO_ARGS(), ?NO_PARENS, X}.

%% Careful with parentheses
-define(Now(), 100).
-define(Elapsed(Since), (?Now() - Since)).
-define(Remains(Since, Remaining), N - ?Elapsed(Since)).

0 comments on commit 56e1e2a

Please sign in to comment.