Away from the BasicIDE link @Sagenut posted which adds Scriptingfunctionality to your Project:
You can not compile a Android App from within Android. The complete Toolchain is based on Windows and not available in Android.
Actually it's a full device based IDE for coding complete apps on the phone though you can use the interpreter library to add scripting to your own apps as well.