-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web page for evaluating ArnoldC programs #8
Comments
Several months ago, I put together a compiler for another language using CodeMirror and other JavaScript tricks: http://mapplz.com/howandwhy.html I'll take a look at ArnoldC tonight and see what I can do. It'd be cool to host it on the gh-pages branch of this repo. |
Check it out! Not 100% but it has printing, variable initialization, variable assignment, and operands: http://mapmeld.github.io/ArnoldC/ Sample programs:
If you screw up, it should have syntax errors (not Arnold-ified, unfortunately). |
Can you guide me how to compile it without using your compiler ? |
@Sourcex4447 do you mean running it on another website? Requires jQuery, CodeMirror.js, plus arnoldc.js and arnoldc-compiler.js from that page. Then you'd need to write a file like homepage.js to pass a <textarea> to CodeMirror. This works even if it was created with $("<textarea>") and never actually on the page. Sample code:
Result: console.log says "missing IT'S SHOWTIME on first line" -- you can overwrite console.log in your application to print onto the page. |
Can't I just Run in my windows PC ? |
Oh, I misunderstood. Can you type some ArnoldC code in that text area and |
Now supports conditionals and loops! It runs the printing 1 to 10 example! |
No description provided.
The text was updated successfully, but these errors were encountered: