diff options
author | 2021-03-25 00:00:22 -0700 | |
---|---|---|
committer | 2021-03-25 00:00:22 -0700 | |
commit | 30cccdf7154b6470e876464da9e412af10894dd5 (patch) | |
tree | 73ed40b30af23ba3e5b94070e478f3e2ca1670c0 /src/compiler/parse/state/setup.ts | |
parent | a72ab10c623022860691d6a095b74dea70cc6f69 (diff) | |
download | astro-30cccdf7154b6470e876464da9e412af10894dd5.tar.gz astro-30cccdf7154b6470e876464da9e412af10894dd5.tar.zst astro-30cccdf7154b6470e876464da9e412af10894dd5.zip |
add component state, top-level await support (#26)
Diffstat (limited to 'src/compiler/parse/state/setup.ts')
-rw-r--r-- | src/compiler/parse/state/setup.ts | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/compiler/parse/state/setup.ts b/src/compiler/parse/state/setup.ts deleted file mode 100644 index f64d8c52b..000000000 --- a/src/compiler/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; -} |