Skip to content

Commit

Permalink
Small fix for detecting functions in C
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman-Skabin authored and focus-editor committed Apr 6, 2024
1 parent 9b47ff9 commit 0bd93aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/langs/c.jai
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ highlight_c_syntax :: (using buffer: *Buffer, start_offset := -1, count := -1) -
prev_token := cast(*Token) prev_tokens[0];

// Maybe retroactively highlight a function
if prev_token.type == .punctuation && prev_token.punctuation == .l_paren {
if token.type == .punctuation && token.punctuation == .l_paren {
// Handle "func("
if prev_token.type == .identifier {
memset(colors.data + prev_token.start, xx Color.CODE_FUNCTION, prev_token.len);
Expand Down

0 comments on commit 0bd93aa

Please sign in to comment.