diff options
author | 2022-03-21 14:30:23 -0300 | |
---|---|---|
committer | 2022-03-21 12:30:23 -0500 | |
commit | 41110ebe729d088a3f6b8ea1e42103a171e36a22 (patch) | |
tree | 969f985e89f6c739d00471ed8dfa68412595a1a9 /packages/astro-parser/src/parse/state/setup.ts | |
parent | 0c5378b8cf4fcf4a7b4e6c9e33f0ba9c370990f3 (diff) | |
download | astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.tar.gz astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.tar.zst astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.zip |
chore: remove `@astrojs/parser` (#2845)
* Removed parser from astro
* Removed parser files
* Updated changeset config
* Removed from license
Diffstat (limited to 'packages/astro-parser/src/parse/state/setup.ts')
-rw-r--r-- | packages/astro-parser/src/parse/state/setup.ts | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/packages/astro-parser/src/parse/state/setup.ts b/packages/astro-parser/src/parse/state/setup.ts deleted file mode 100644 index cb23860ad..000000000 --- a/packages/astro-parser/src/parse/state/setup.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @ts-nocheck - -import { Parser } from '../index.js'; - -export default function setup(parser: Parser): void { - // TODO: Error if not at top of file? currently, we ignore / just treat as text. - // if (parser.html.children.length > 0) { - // parser.error({ - // code: 'unexpected-token', - // message: 'Frontmatter scripts only supported at the top of file.', - // }); - // } - - const start = parser.index; - parser.index += 3; - const content_start = parser.index; - const setupScriptContent = parser.read_until(/^---/m); - const content_end = parser.index; - parser.eat('---', true); - const end = parser.index; - parser.js.push({ - type: 'Script', - context: 'setup', - start, - end, - content: setupScriptContent, - // attributes, - // content: { - // start: content_start, - // end: content_end, - // styles, - // }, - }); - return; -} |