Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
nobraces: Python-style indentation for C (micropledge.com)
8 points by benhoyt on Sept 25, 2007 | hide | past | favorite | 4 comments


Hint:

- Add the semicolons back to any line that doesn't start with '#' and doesn't end with ':'

- Replace all the ':' with '{'.

- Fill in all of the '}' where they belong, which is probably easier to do by hand on such a short script than to write any logic to do it for you.

Once you've restored it to valid C++, you should be set.


Why don't you just use Python?


Python's footprint is a bit large for embedded systems.


hmm, good point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: