summaryrefslogtreecommitdiff
path: root/packages/astro-parser/src/parse/utils/node.ts
diff options
context:
space:
mode:
authorGravatar Jonathan Neal <jonathantneal@hotmail.com> 2021-12-22 16:11:05 -0500
committerGravatar GitHub <noreply@github.com> 2021-12-22 16:11:05 -0500
commit6ddd7678ffb6598ae6e263706813cb5e94535f02 (patch)
treed4b45f7590b59c3574bd6593b17d8066f71007c6 /packages/astro-parser/src/parse/utils/node.ts
parent305ce4182fbe89abcfb88008ddce178bd8863b6a (diff)
downloadastro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.gz
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.zst
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.zip
Use accessible indentation (#2253)
Diffstat (limited to 'packages/astro-parser/src/parse/utils/node.ts')
-rw-r--r--packages/astro-parser/src/parse/utils/node.ts52
1 files changed, 26 insertions, 26 deletions
diff --git a/packages/astro-parser/src/parse/utils/node.ts b/packages/astro-parser/src/parse/utils/node.ts
index 45769f96e..27891d6f3 100644
--- a/packages/astro-parser/src/parse/utils/node.ts
+++ b/packages/astro-parser/src/parse/utils/node.ts
@@ -1,30 +1,30 @@
import { TemplateNode } from '../../interfaces.js';
export function to_string(node: TemplateNode) {
- switch (node.type) {
- case 'IfBlock':
- return '{#if} block';
- case 'ThenBlock':
- return '{:then} block';
- case 'ElseBlock':
- return '{:else} block';
- case 'PendingBlock':
- case 'AwaitBlock':
- return '{#await} block';
- case 'CatchBlock':
- return '{:catch} block';
- case 'EachBlock':
- return '{#each} block';
- case 'RawMustacheTag':
- return '{@html} block';
- case 'DebugTag':
- return '{@debug} block';
- case 'Element':
- case 'InlineComponent':
- case 'Slot':
- case 'Title':
- return `<${node.name}> tag`;
- default:
- return node.type;
- }
+ switch (node.type) {
+ case 'IfBlock':
+ return '{#if} block';
+ case 'ThenBlock':
+ return '{:then} block';
+ case 'ElseBlock':
+ return '{:else} block';
+ case 'PendingBlock':
+ case 'AwaitBlock':
+ return '{#await} block';
+ case 'CatchBlock':
+ return '{:catch} block';
+ case 'EachBlock':
+ return '{#each} block';
+ case 'RawMustacheTag':
+ return '{@html} block';
+ case 'DebugTag':
+ return '{@debug} block';
+ case 'Element':
+ case 'InlineComponent':
+ case 'Slot':
+ case 'Title':
+ return `<${node.name}> tag`;
+ default:
+ return node.type;
+ }
}