no-context / moo

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
821 stars 65 forks source link

Add spread operator example. #48

Closed knpwrs closed 7 years ago

knpwrs commented 7 years ago

This adds an example of using the spread operator to get an array of tokens.

tjvr commented 7 years ago

Thanks for contributing! :-)

Hmm. I think I would prefer Array.from here. What do you think?

knpwrs commented 7 years ago

That sounds good to me. Anything is better than the classic array.push(...) until done.

tjvr commented 7 years ago

Thanks! 👍