There is no certain tool to move your code from Arduino to FPGA/NIOS. you can simply create your design in Qsys and re-write the code. Don't worry there are punch of examples to start with at Intel design store.
Let me know how can I support you.
The Teensyduino code is simple and I can gather the code in one place as one function. no external libraries or hidden. Then can I convert the code?
I understand your concern but the Arduino has different libraries. The FPGA is much bigger in capabilities and more flexible than any micro controller solution.