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

Feature Request: Convert ObjC booleans to ruby booleans #3

Open
bewatts opened this issue Nov 7, 2014 · 5 comments
Open

Feature Request: Convert ObjC booleans to ruby booleans #3

bewatts opened this issue Nov 7, 2014 · 5 comments

Comments

@bewatts
Copy link

bewatts commented Nov 7, 2014

Convert YES and NO to true and false.

I'm open to doing this :)

@muescha
Copy link

muescha commented Nov 9, 2014

👍

@bensheldon
Copy link
Owner

Thanks for opening the issue! I (obviously) haven't updated this repository in a while. But I'm open to taking Pull Requests and will push them through to get updated.

The project is currently a mess of Javascripted Regexp which is not particularly ideal. The proper way to do things would be to build an actual grammar parser with something like TreeTop.

@bensheldon
Copy link
Owner

Also, you might look here for an implementation in the Sublime plugin that was the inspiration for this project: https://github.com/kyamaguchi/SublimeObjC2RubyMotion/blob/deae4f269b572012297003af0e2011e27c383773/CodeConverter.py#L134-L137

@TigerWolf
Copy link

https://github.com/TigerWolf/objc2rubymotion/tree/feature/trueandfalse

Its not using the ideal method but I can make a PR if you want.

@bensheldon
Copy link
Owner

@TigerWolf looks good. Would you be able to add a spec for it?
https://github.com/TigerWolf/objc2rubymotion/blob/feature/trueandfalse/app/assets/javascripts/spec/converter_spec.js.coffee

And then please do open a PR. Thank you!

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

4 participants