Skip to content

Commit

Permalink
Remove redundant conditions (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoanana990 authored Feb 29, 2024
1 parent 054c7f6 commit 10153eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int macro_return_idx;

int is_whitespace(char c)
{
return (c == ' ' || c == '\t');
return c == ' ' || c == '\t';
}

char peek_char(int offset);
Expand All @@ -107,7 +107,7 @@ int is_linebreak(char c)

int is_newline(char c)
{
return (c == '\r' || c == '\n');
return c == '\r' || c == '\n';
}

/* is it alphabet, number or '_'? */
Expand All @@ -119,7 +119,7 @@ int is_alnum(char c)

int is_digit(char c)
{
return (c >= '0' && c <= '9') ? 1 : 0;
return c >= '0' && c <= '9';
}

int is_hex(char c)
Expand Down

0 comments on commit 10153eb

Please sign in to comment.