Skip to content
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

Fails to properly handle raw true conditional #5

Closed
shawn42 opened this issue Dec 28, 2012 · 2 comments
Closed

Fails to properly handle raw true conditional #5

shawn42 opened this issue Dec 28, 2012 · 2 comments

Comments

@shawn42
Copy link
Collaborator

shawn42 commented Dec 28, 2012

jruby -I target:src/main/ruby src/main/ruby/fast_ruby.rb -e "if true; puts 'yay'; else; puts 'wah?'; end"
javac DashE.java
java DashE
=> wah?

This should output yay.

@headius
Copy link
Owner

headius commented Dec 28, 2012

Ahh yes...this should be an easy one. I'll add it, so you can see how to add new syntax.

The key is to look at NodeVisitor in JRuby. The ExpressionVisitor in fastruby implements that interface. Adding new syntax is just a matter of implementing the visit* method and emitting code using JDT. I'll try to write up some information on the basics of fastruby later.

@headius
Copy link
Owner

headius commented Dec 28, 2012

Fixed by ae956c1

@headius headius closed this as completed Dec 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants