It would take lots of work. Your editor must be robust enough to edit a very very large source file. Compile times would be long. Editing one line requires rebuilding everything. The compiler and/or linker might run out of memory and crash.That would not be a whole system?
You would still need to compile and line loadable kernel modules separately. Ditto for user libraries.