The long answer is that BAS has its own internal code generator, which means that everything in the BAS XML was generated by that system.
However, I strongly do not recommend writing code by hand. It will be extremely difficult to update and understand the code later based on what you wrote today.