paulbartrum / jurassic

A .NET library to parse and execute JavaScript code.
MIT License
866 stars 121 forks source link

Support for arrow functions #84

Open halex2005 opened 7 years ago

halex2005 commented 7 years ago

Hi! Thanks for great library! I'd like to contribute to this project and implement arrow functions support. Can you tell where I can start from to do this? What parts I need to touch to complete this task?

paulbartrum commented 7 years ago

Well, you'd need to modify the lexer to recognise -> as a token, then modify the compiler to parse that token and produce a FunctionExpression. The hard part is likely modifying the semantics of this, plus the changes to arguments and new.

PS sorry for the slow response.