praekeltfoundation / jspot

Extracts gettext strings from Javascript files into pot files
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

More robust argument parsing #33

Closed justinvdm closed 9 years ago

justinvdm commented 9 years ago

We need a more robust way of parsing a call expression's arguments that allows us to ignore the arguments we don't use.

justinvdm commented 9 years ago

This should solve #14.

justinvdm commented 9 years ago

@JSteunou could you take a look at this and let me know what you think? I based this off #32 (couldn't add a commit to the PR since that would require pushing to your fork's branch).

Basically, I changed the extraction to wrap each of every matching call expression's arguments in a function. That means anything we don't use won't be evaluated, which I think simplifies things a bit.

JSteunou commented 9 years ago

Ho, it's nice, I like it! Much more readable (specially 6 month after last look at it :D) and should prevent for other not yet seen tricky cases.

justinvdm commented 9 years ago

Thanks :) I'm going to go ahead and merge and release then.

JSteunou commented 9 years ago

Cool, thank you for the quick fix & release :)

justinvdm commented 9 years ago

0.3.5 released :)