Skip to content

Commit 2f83ea5

Browse files
committed
Wrap erlang macros in ()
1 parent 7940d22 commit 2f83ea5

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/elixir/src/elixir.hrl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@
4141
%% Used in tokenization and interpolation
4242

4343
%% Numbers
44-
-define(is_hex(S), ?is_digit(S) orelse (S >= $A andalso S =< $F) orelse (S >= $a andalso S =< $f)).
45-
-define(is_bin(S), S >= $0 andalso S =< $1).
46-
-define(is_octal(S), S >= $0 andalso S =< $7).
47-
-define(is_leading_octal(S), S >= $0 andalso S =< $3).
44+
-define(is_hex(S), (?is_digit(S) orelse (S >= $A andalso S =< $F) orelse (S >= $a andalso S =< $f))).
45+
-define(is_bin(S), (S >= $0 andalso S =< $1)).
46+
-define(is_octal(S), (S >= $0 andalso S =< $7)).
47+
-define(is_leading_octal(S), (S >= $0 andalso S =< $3)).
4848

4949
%% Digits and letters
50-
-define(is_digit(S), S >= $0 andalso S =< $9).
51-
-define(is_upcase(S), S >= $A andalso S =< $Z).
52-
-define(is_downcase(S), S >= $a andalso S =< $z).
50+
-define(is_digit(S), (S >= $0 andalso S =< $9)).
51+
-define(is_upcase(S), (S >= $A andalso S =< $Z)).
52+
-define(is_downcase(S), (S >= $a andalso S =< $z)).
5353

5454
%% Atoms
55-
-define(is_atom_start(S), ?is_quote(S) orelse ?is_upcase(S) orelse ?is_downcase(S) orelse (S == $_)).
56-
-define(is_atom(S), ?is_identifier(S) orelse (S == $@)).
55+
-define(is_atom_start(S), (?is_quote(S) orelse ?is_upcase(S) orelse ?is_downcase(S) orelse (S == $_))).
56+
-define(is_atom(S), (?is_identifier(S) orelse (S == $@))).
5757

58-
-define(is_identifier(S), ?is_digit(S) orelse ?is_upcase(S) orelse ?is_downcase(S) orelse (S == $_)).
59-
-define(is_sigil(S), (S == $/) orelse (S == $<) orelse (S == $") orelse (S == $') orelse
60-
(S == $[) orelse (S == $() orelse (S == ${) orelse (S == $|)).
58+
-define(is_identifier(S), (?is_digit(S) orelse ?is_upcase(S) orelse ?is_downcase(S) orelse (S == $_))).
59+
-define(is_sigil(S), ((S == $/) orelse (S == $<) orelse (S == $") orelse (S == $') orelse
60+
(S == $[) orelse (S == $() orelse (S == ${) orelse (S == $|))).
6161

6262
%% Quotes
63-
-define(is_quote(S), S == $" orelse S == $').
63+
-define(is_quote(S), (S == $" orelse S == $')).
6464

6565
%% Spaces
66-
-define(is_horizontal_space(S), (S == $\s) orelse (S == $\t)).
67-
-define(is_vertical_space(S), (S == $\r) orelse (S == $\n)).
68-
-define(is_space(S), ?is_horizontal_space(S) orelse ?is_vertical_space(S)).
69-
-define(is_invalid_space(S), S == 16#A0).
66+
-define(is_horizontal_space(S), ((S == $\s) orelse (S == $\t))).
67+
-define(is_vertical_space(S), ((S == $\r) orelse (S == $\n))).
68+
-define(is_space(S), (?is_horizontal_space(S) orelse ?is_vertical_space(S))).
69+
-define(is_invalid_space(S), (S == 16#A0)).

0 commit comments

Comments
 (0)