Writing a Javascript to C compiler