astro/test
Matthew Phillips ad9c3b1d8d
Parse inner JSX as Astro (#67)
* Parse inner JSX as Astro

This completes the compiler changes, updating the parser so that it parses inner "JSX" as Astro. It does this by finding the start and end of HTML tags and feeds that back into the parser.

The result is a structure like this:

```
{
  type: 'MustacheTag',
  expression: [
    {
      type: 'Expression',
      codeStart: 'colors.map(color => (',
      codeEnd: '}}'
      children: [ {
        type: 'Fragment',
        children: [ {
          type: 'Element',
          name: 'div'
        } ]
      } ]
    }
  ]
}
```

There is a new Node type, `Expression`.  Note that `MustacheTag` remains in the tree, all it contains is an Expression though. I could spend some time trying to remove it, there's just a few places that expect it to exist.

* Update import to the transform

* Transform prism components into expressions
2021-04-09 14:09:13 -04:00
..
fixtures Parse inner JSX as Astro (#67) 2021-04-09 14:09:13 -04:00
astro-basic.test.js [ci] npm run format 2021-04-05 18:18:39 +00:00
astro-doctype.test.js [ci] npm run format 2021-03-30 14:52:09 +00:00
astro-expr.test.js Parse inner JSX as Astro (#67) 2021-04-09 14:09:13 -04:00
astro-fallback.test.js Implement fallback capability (#44) 2021-03-31 16:10:27 -04:00
astro-markdown.test.js Fix complex MDX parsing (#50) 2021-04-01 16:34:11 -04:00
astro-request.test.js Implements import.meta.request (#46) 2021-03-31 16:47:03 -04:00
astro-scoped-styles.test.js Parse inner JSX as Astro (#67) 2021-04-09 14:09:13 -04:00
astro-search.test.js Improve searching for pages (#60) 2021-04-05 14:18:09 -04:00
astro-styles-ssr.test.js Get CSS Modules working in Vue (#53) 2021-04-02 10:16:16 -06:00
helpers.js Implement fallback capability (#44) 2021-03-31 16:10:27 -04:00
react-component.test.js [ci] npm run format 2021-03-30 14:52:09 +00:00
snowpack-integration.test.js [ci] npm run format 2021-03-30 14:52:09 +00:00
test-utils.js Absorb Snowpack config inside Astro (#32) 2021-03-26 13:14:32 -06:00