flashios09 / extract-tagged-template-literals

Search and extract tagged template literals from javascript/typescript file.
1 stars 1 forks source link

Use a js/ts parser instead of regex #3

Open flashios09 opened 4 years ago

flashios09 commented 4 years ago

@rwjblue Because JS/TS is contextual, parsing with regular expressions is not valid. Consider the following case (and there are many more like it):


/**
Some documentation here
  export default Component.extend({
    layout: hbs`hello from the example!`,
  })

*/