-
Notifications
You must be signed in to change notification settings - Fork 9
Use AST manipulation rather than string based for rewrites #71
base: master
Are you sure you want to change the base?
Conversation
|
Goal: Keep from using external libraries within the AST Tree/Node systems |
|
Note: Source code style is changing as made obvious by this branch. 4 spaces for tabs |
|
Boo semicolons. |
|
I find a nit to pick because I like everything else so much ;) |
|
I was using CoffeeScript at my last job. My current job is using more traditional JavaScript including semi-colons and let me tell you how trying to actively code both ways messes with my brain. |
|
At my job every developer uses a different style for each file ;) It was a major headfuck but now I seem to have picked up the skill to switch style at will. Definitely helps out for the open source stuff. |
|
BTW, can I submit patches against this branch to add in the missing features from the main branch six? Or are you still actively changing things? |
|
I am at work atm, when I get back tonight I plan on putting in the version I'd suggest working off of. How do you feel about doing an esprima parse to generate the AST for rewrites the way I did here: https://github.com/matthewrobb/six/blob/new-six-egal/src/rewriter.six#L27 It should increase startup time but not have too much effect on overall compile time. Otherwise we could pre-compile those AST's. |
|
I'm in the UK, just finished work ;) A late day! Y'know I was thinking that exact same thing. Great minds.... |
|
Great minds contribute to open source? |
|
listen to Jimi Hendrix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nuisanceofcats I am exporting this hooks array so that larger rewrites can be moved out into sub modules that import hooks and can push more functions into the array.
|
@nuisanceofcats You can pull this down and see about implementing some features with this new setup. Thanks, let me know how it goes! |
|
OH! I am going to try to have better test coverage as I implement features this time around. Some of the test cases should be able to be brought over from the master branch np. |
|
Have you ever grown a beard? I started hacking on this, I had changed quite a bit and added in most of the old features, but it's in the same spirit. Rather than using "hidey methods" I just used functions. Seemed kinda simpler. I like a hybrid approach though, maybe others are more strict functional or strict declarative or objected oriented. I'm just pragmatic. I'll push the code so you can noodle it, but maybe I changed too much or whatever.. see what you think. Do you like beards? Do you like cats? Do you have any animals? Which are your favourite genres of music? |
|
Make a pull request against new-six branch with these new features. Can you let me know what sort of features you have implemented thus far? |
|
Made another go at doing this properly: https://github.com/nuisanceofcats/the-party It's not bad. |
Opening this pull request to support the long term goal of making this merge. Any work done on master will need to eventually port to this branch. Once I get the foundation fully built out it would be best to abandon developments on master until this branch gets merged.