Skip to content

Commit

Permalink
Merge pull request Wilfred#17 from postsolar/fix-comments
Browse files Browse the repository at this point in the history
Fix comments which start with non-alphanumerics
  • Loading branch information
Maskhjarna committed Sep 25, 2023
2 parents 92af5e2 + d14450f commit a619f51
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,7 @@ static Symbolic s_symop(wchar_vec s, State *state) {
default: return con_or_var(c);
}
} else {
bool is_comment = true;
for (size_t i = 0; i < s.len; i++) { is_comment &= s.data[i] == '-'; }
bool is_comment = (s.data[0] == '-') & (s.data[1] == '-');
if (is_comment) return S_COMMENT;
if (s.len == 2) {
if (s.data[0] == '$' && s.data[1] == '$' && valid_splice(state)) return S_SPLICE;
Expand Down

0 comments on commit a619f51

Please sign in to comment.