This Python script provides a simple conversion from KickAssembler source code into C-like format. This new syntax is readable from Doxygen.
Converted files are not meant to contain valid source code.
This script is not perfect and suits well for most of the KickAssembler source code. Feel free to improve it.
This script is used in many repository derived from c128lib project. A working documentation can be found on framework repository.
Usage: python KickAssemblerToDoxygen.py <folder-name>
Example: python KickAssemblerToDoxygen.py .\lib
Output file will be automatically created in "output" folder inside folder passed by argument.
Remeber to use slash or backslash correctly.
It works with Python 3.10 and (hopefully) above.
This script removes:
- .assert
- .asserterror
- .filenamespace
- .importonce
- .import
After removing all these stuff, it fixes struct declaration.
Next step is to remove initial dot from keywords and then add a semicolon at the end of every label and const declaration.
This sequence is repeated for every file specificated as argument and edited file are saved in output folder.