feat: disallow single-line comments in < c99 #9

Merged
thacuber2a03 merged 2 commits from c89-single-line-comments into main 2025-10-20 19:24:32 +02:00
Owner

...unless the respective extension flag is set

this closes #1

...unless the respective extension flag is set this closes #1
...unless the respective extension flag is set
alexander.nutz requested changes 2025-10-20 19:16:26 +02:00
Dismissed
libclick/lexer.c Outdated
@ -724,6 +724,10 @@ static lex_res lex_func_delim(lexer* lexer)
static lex_res lex_func_click_doc_comment(lexer* lexer)
{
click_lang_config* lang = &lexer->document->lang;

actually no; this function should only exist for the clike lang family; rename the function instead and remove it from the c family lex list

actually no; this function should only exist for the clike lang family; rename the function instead and remove it from the c family lex list
Author
Owner

it never was in the c-family lex list so that's taken care of
although, to be real, the branch probably wouldn't have been taken if this function really is only called for clike
(by the way, the function says "click", all of them do; I thought you had changed the name)

it never was in the c-family lex list so that's taken care of although, to be real, the branch probably wouldn't have been taken if this function really is only called for clike (by the way, the function says "click", all of them do; I thought you had changed the name)

@thacuber2a03 wrote in https://gitea.vxcc.dev/click-project/click/pulls/9#issuecomment-38:

it never was in the c-family lex list so that's taken care of although, to be real, the branch probably wouldn't have been taken if this function really is only called for clike (by the way, the function says "click", all of them do; I thought you had changed the name)

ohh oops I s/clike/click...

can you rename the function in this PR too?

@thacuber2a03 wrote in https://gitea.vxcc.dev/click-project/click/pulls/9#issuecomment-38: > it never was in the c-family lex list so that's taken care of although, to be real, the branch probably wouldn't have been taken if this function really is only called for clike (by the way, the function says "click", all of them do; I thought you had changed the name) ohh oops I s/clike/click... can you rename the function in this PR too?
Author
Owner

two steps ahead of you; check diff

two steps ahead of you; check diff
thacuber2a03 marked this conversation as resolved
thacuber2a03 changed title from feat: disallow single-line comments in <= c99 to feat: disallow single-line comments in < c99 2025-10-20 19:16:46 +02:00
thacuber2a03 deleted branch c89-single-line-comments 2025-10-20 19:24:32 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
click-project/click!9
No description provided.