Commit graph

85 commits

Author SHA1 Message Date
086e841110
make the test name a string
this is to avoid treesitter shitting itself
2024-04-28 18:52:13 +02:00
119a024045
add initial test work 2024-04-28 17:43:53 +02:00
edeb39adc2
small target change for object files 2024-04-28 01:48:35 +02:00
9e92f49757
extract parsing logic into separate generic macros 2024-04-28 01:30:58 +02:00
46299a089b
add HitSample 2024-04-27 14:15:09 +02:00
6ff75669a0
clean up macros in the osuparser header 2024-04-26 20:48:46 +02:00
7c2d4da6e2
make main print available songs by default 2024-04-26 20:24:09 +02:00
3aa342d46b
name section structs in Difficulty 2024-04-26 20:00:24 +02:00
e139115ede
tick section lists off of TODO 2024-04-26 19:50:14 +02:00
b978fb2288
fix pretty much everything, read description
this is a big (or dare I say, huge) commit that pretty much fixes every
problem I've had so far with the basic parsing

I still need to do a custom operator>> for some types but at this point
the parser goes through the entire file and prints out everything which
is a large milestone I'd say

changes in this commit:
- add SECTION_LIST for a section containing a single list of values
  examples: TimingPoints, HitObjects
- improve operator>> for enums making it accept int values and fail
  properly when the value is incorrect (there's a warning I need to get
  rid of but it's ok for now)
- skip over blank lines: adding this single line (src/osuparser.cpp:52)
  made the parser go from shitting itself to actually going through the
  whole file and printing everything (with some errors but still)
- new string util: isBlank() used for the above
- new __VA_ARGS__ util: ARG_COUNT() and rename foreach.hpp to
  va_args_util.hpp as that name no longer fits
2024-04-26 19:05:35 +02:00
5e0eb7efe3
fix currentSection parsing 2024-04-26 12:10:17 +02:00
b8512cd486
set the line length in list macros properly 2024-04-26 11:19:29 +02:00
db6bd63013
add dev instructions 2024-04-25 23:31:09 +02:00
624431b72e
add some todo items 2024-04-25 23:26:56 +02:00
574b8aed21
simplify nix instructions 2024-04-25 23:20:07 +02:00
e693260eff
fix difficulty.hpDrainRate's prefix 2024-04-25 22:38:12 +02:00
725cae21eb
handle parsing ints to enums 2024-04-25 22:35:14 +02:00
ad03011871
create separate header for string util functions 2024-04-25 22:34:51 +02:00
9a75404847
fix setting the default value
basically before this commit, the default value was set *before* the
prefix check which means it was set on each line instead of only when
the current var is being parsed (as it should)
2024-04-25 22:32:16 +02:00
e8f050ad18
add missing push_back in VAR_LIST 2024-04-25 19:50:18 +02:00
bd0b1f3e97
(probably partly) fix list parsing implementations 2024-04-25 19:17:49 +02:00
a918f155b4
update separators to be chars instead of strings 2024-04-25 19:17:23 +02:00
a95e79ac35
Revert "remove redundant struct"
This reverts commit d0b5c4d514.
2024-04-25 17:46:08 +02:00
b710520724
get rid of config.hpp in osuparser.hpp when pp debugging 2024-04-25 12:14:41 +02:00
d0b5c4d514
remove redundant struct 2024-04-25 11:53:51 +02:00
19ff37e7b8
massively improve the awk fuckery
thank you krizej I actually forgot about g++ -D
2024-04-25 11:49:09 +02:00
cc538d835e
remove broken list parsing implementations 2024-04-25 00:36:30 +02:00
e177b7231f
add missing prefix parameter 2024-04-24 23:58:31 +02:00
ff597fdc23
improve the makefile awk comment 2024-04-24 23:41:45 +02:00
c967207520
awk marker comments to save necessary macros
I restructured the beginnings of the preprocessed files for debugging to
make the awks in the makefile not eat headers which are needed for
debugging (e.g. the FOR_EACH macro)

it's done by putting awk marker comments:

// awk stop marker (check make pp)

after the macros to be eaten by awk and before the ones we wanna keep

I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this I hate this
2024-04-24 23:36:25 +02:00
e1dbdf5228
speed up make pp from 23 seconds to almost instant
this is done by removing all headers from the top of the file using that
awk written by the amazing Jappie3 from the hyprland discord

g++ -E itself was pretty fast but clang-format took a while to format a
52k line file (wonder why), removing std makes the files considerably
smaller and makes the whole operation almost instant

one small issue is currently the script removes every single header
unless it hits something else - not ideal since my own headers will get
wiped too and in the preprocessed output not all macros will be
evaluated (e.g. FOR_EACH from for_each.hpp in config.hpp)
2024-04-24 23:25:15 +02:00
3c4f5ababa
rename make preprocess to make pp
thanks for the suggestion krizej
2024-04-24 20:14:35 +02:00
d4d0822eff
simplify make preprocess using clang-format's -i
thanks for letting me know krizej I wouldn't have found this myself
2024-04-24 20:09:04 +02:00
2e259e946d
improve make preprocess
fun story - I had this exact piece of code without a single changed not
work the prior 2 times, then I changed a bit, a part started working so
I changed it back to this and the 3rd time it somehow works
2024-04-24 20:03:18 +02:00
d2342cad28
src -> $(SRC) in da makefile 2024-04-24 19:53:08 +02:00
cf110103ad
add make preprocess 2024-04-24 19:30:34 +02:00
29d00653eb
minor issue 2024-04-23 16:42:24 +02:00
1f4416aa0a
major formatting change 2024-04-23 16:23:29 +02:00
43f138b7b2
formatting fix 2024-04-21 13:34:18 +02:00
a824c09cee
add initial broken implementations of list macros 2024-04-21 10:41:03 +02:00
becc44a098
add separated list with a prefix 2024-04-21 10:40:43 +02:00
019d55afd2
whoops forgot about that 2024-04-21 10:40:07 +02:00
05ce1f309b
put timingPoints and hitObjects into sections 2024-04-21 10:39:43 +02:00
3d847e9da2
amazing 2024-04-20 14:11:53 +02:00
79441b46fd
update beatmap option and help text 2024-04-20 14:08:55 +02:00
8d7b193cf6
remove newline in struct output stream op 2024-04-20 13:41:03 +02:00
c5491dbc9f
refactor a huge part of the code
this allows for creating only input and output streams and allows me to
finally print out the generated config struct
2024-04-20 13:37:06 +02:00
82929e16bf
add util stream ops and print difficulty on -p 2024-04-20 12:08:55 +02:00
810f81370a
remove one unnecessary header from osuparser 2024-04-19 14:52:55 +02:00
512bbeac51
remove unnecessary undefs in config 2024-04-19 10:15:57 +02:00