split click.h into multiple, independent modules #15

Merged
alexander.nutz merged 11 commits from refactor/split-click-header into main 2025-10-23 09:15:24 +02:00
Owner

or, at least, tries to. some things might still be broken after this, and some things might not be on their correct places.

this closes #14, or at least it should

or, at least, tries to. some things might still be broken after this, and some things might not be on their correct places. this closes #14, or at least it should
thacuber2a03 changed title from WIP: split click.h into multiple, independent modules to split click.h into multiple, independent modules 2025-10-21 01:20:02 +02:00
thacuber2a03 changed title from split click.h into multiple, independent modules to WIP: split click.h into multiple, independent modules 2025-10-21 01:20:14 +02:00
Author
Owner

@alexander.nutz need your review here

@alexander.nutz need your review here
alexander.nutz requested changes 2025-10-21 06:47:02 +02:00
Dismissed
@ -11,3 +5,4 @@
extern "C" {
#endif
// TODO(thacuber2a03): should these flags stay here?

move these, and click_unreachable and stuff, into compiler.h

move these, and click_unreachable and stuff, into compiler.h
Author
Owner

"and stuff"? so, most of what is in common.h? or I missed something else?

"and stuff"? so, most of what is in common.h? or I missed something else?

well we could move panics too

well we could move panics too
@ -0,0 +1,68 @@
#ifndef cpp_hpp_INCLUDED

rename file to obj.hpp or sth

rename file to obj.hpp or sth
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,68 @@
#ifndef cpp_hpp_INCLUDED
#define cpp_hpp_INCLUDED

include def for click_new and other object stuff

include def for `click_new` and other object stuff
thacuber2a03 marked this conversation as resolved
@ -0,0 +63,4 @@
T* raw() const { return _ptr; }
};
} // namespace click
#endif // __cplusplus

remove this line

remove this line
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,14 @@
#ifndef lexer_h_INCLUDED

please merge this header with the tokenty and stuff; we don't need that much splitting

please merge this header with the tokenty and stuff; we don't need that much splitting
Author
Owner

I honestly forgot tokens.h was a thing that did in fact exist before making this file but sure

I honestly forgot tokens.h was a thing that did in fact exist before making this file but sure
alexander.nutz marked this conversation as resolved
thacuber2a03 force-pushed refactor/split-click-header from 71c6e7738b to c8f250826f 2025-10-21 08:50:22 +02:00 Compare
alexander.nutz closed this pull request 2025-10-21 08:51:34 +02:00

FUUCK oops

FUUCK oops
alexander.nutz reopened this pull request 2025-10-21 08:51:51 +02:00
@ -0,0 +1,25 @@
#ifndef bigint_h_INCLUDED

needs to be prefixed with click_

needs to be prefixed with click_
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,16 @@
#ifndef arena_h_INCLUDED

also needs to be prefixed with click_

also needs to be prefixed with click_
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,50 @@
#ifndef common_h_INCLUDED

prefix with click_

prefix with click_
Author
Owner

funny, Kakoune does the header guard automatically based on the buffer name alone

funny, Kakoune does the header guard automatically based on the buffer name alone
thacuber2a03 marked this conversation as resolved
thacuber2a03 stopped working 2025-10-21 08:56:35 +02:00
4 seconds
thacuber2a03 deleted spent time 2025-10-21 08:56:44 +02:00
- 4 seconds
@ -0,0 +1,223 @@
#ifndef document_h_INCLUDED

prefix with _click

prefix with _click
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,14 @@
#ifndef lexer_h_INCLUDED
#define lexer_h_INCLUDED

prefix eith _click

prefix eith _click
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,85 @@
#ifndef obj_h_INCLUDED

guess what
prefix with click

guess what prefix with click
thacuber2a03 marked this conversation as resolved

uh wtf also prefix with click

uh wtf also prefix with click
Author
Owner

yep

yep
thacuber2a03 marked this conversation as resolved
@ -0,0 +1,164 @@
#ifndef util_h_INCLUDED

...

...
Author
Owner

Kakoune does the header guard automatically based on the buffer name alone

give me a while

> Kakoune does the header guard automatically based on the buffer name alone give me a while
thacuber2a03 marked this conversation as resolved
thacuber2a03 stopped working 2025-10-21 09:06:19 +02:00
5 minutes 55 seconds
alexander.nutz requested changes 2025-10-22 07:01:20 +02:00
Dismissed

eh not a fan of the lexer include here

eh not a fan of the lexer include here
Author
Owner

what do you suggest? just remove it?

what do you suggest? just remove it?
alexander.nutz marked this conversation as resolved
@ -0,0 +1,16 @@
#ifndef _click_common_h_INCLUDED

move all assert related stuff from util.h into here

move all assert related stuff from util.h into here
@ -0,0 +11,4 @@
# define click_noreturn __attribute__((noreturn))
# define click_unreachable_impl __builtin_unreachable()
# define click_deprecated(message) \
__attribute__((deprecated(message)))

remove this include

remove this include
Author
Owner

@alexander.nutz check it now

@alexander.nutz check it now
thacuber2a03 stopped working 2025-10-23 07:10:52 +02:00
12 minutes 15 seconds
thacuber2a03 changed title from WIP: split click.h into multiple, independent modules to split click.h into multiple, independent modules 2025-10-23 09:05:42 +02:00
alexander.nutz force-pushed refactor/split-click-header from 5db4705286 to 7bb8ae08dd 2025-10-23 09:14:27 +02:00 Compare
alexander.nutz deleted branch refactor/split-click-header 2025-10-23 09:15:25 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 18 minutes 10 seconds
thacuber2a03
18 minutes 10 seconds
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!15
No description provided.