Your comments
You could leave language dependent code completely on the server-side and allow users to contribute server side connectors for Textastic - otherwise as a single developer it will be difficult to support more than a few languages even with the approach of reusing code from other tools.
Using an SSH session to a compiler could also close the gap of the missing compiler/debugger in Textastic without reinventing the wheel on your side and also provide a good deal of language independent toolkit - you only would need to send control commands to the compiler/debugger, feed back and parse the output in Textastic and you could even highlight problems in the code. This is probably easier than the code completion itself and possibly about as useful.
For code completion - there possibly looking into what scripts/tools are there on the server side (e.g. scripts for vim) is probably easier than integrating the code in textastic itself. One could try to tap into the scripts, extract the completion tree and sync it with textastic over SSH.
For code completion - there possibly looking into what scripts/tools are there on the server side (e.g. scripts for vim) is probably easier than integrating the code in textastic itself. One could try to tap into the scripts, extract the completion tree and sync it with textastic over SSH.
Here is code completion for vim using clang/LLVM - might serve as a starting point - https://github.com/Rip-Rip/clang_complete
Regarding C/C++/Obj-C you might want to look into clang/llvm http://clang.llvm.org/get_started.html - while this is a full fledged compiler toolkit, one might check the ios appstore publishing guideline if it is possible to extract the part necessary for code completion disabling the compiler functionality - and if not possible one could host clang on a server and let textastic ssh into it working as a kind of editor cache using clang as a back-end.
Customer support service by UserEcho
http://llvm.org/devmtg/2010-11/Gregor-libclang.pdf
http://devimages.apple.com/llvm/videos/Libclang.mov