Home / File/ KeyBlock.js — svelte Source File

KeyBlock.js — svelte Source File

Architecture documentation for KeyBlock.js, a javascript file in the svelte codebase. 5 imports, 1 dependents.

File javascript Compiler Transformer 5 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  32ff766e_8f23_837c_5646_c073d4b6ae96["KeyBlock.js"]
  c4b4ac8d_9914_5ede_1aea_723bf80d2e9b["fragment.js"]
  32ff766e_8f23_837c_5646_c073d4b6ae96 --> c4b4ac8d_9914_5ede_1aea_723bf80d2e9b
  313d2a82_30ea_3161_3aad_0cc2094979aa["mark_subtree_dynamic"]
  32ff766e_8f23_837c_5646_c073d4b6ae96 --> 313d2a82_30ea_3161_3aad_0cc2094979aa
  bf0d8f1b_17da_970d_bf44_fbcf099d5371["utils.js"]
  32ff766e_8f23_837c_5646_c073d4b6ae96 --> bf0d8f1b_17da_970d_bf44_fbcf099d5371
  ea08cb05_2664_4e93_7551_6103e0cb3a87["validate_block_not_empty"]
  32ff766e_8f23_837c_5646_c073d4b6ae96 --> ea08cb05_2664_4e93_7551_6103e0cb3a87
  7148e639_69d8_a03d_3f08_bd23f41e718a["validate_opening_tag"]
  32ff766e_8f23_837c_5646_c073d4b6ae96 --> 7148e639_69d8_a03d_3f08_bd23f41e718a
  4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 32ff766e_8f23_837c_5646_c073d4b6ae96
  style 32ff766e_8f23_837c_5646_c073d4b6ae96 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import { mark_subtree_dynamic } from './shared/fragment.js';
import { validate_block_not_empty, validate_opening_tag } from './shared/utils.js';

/**
 * @param {AST.KeyBlock} node
 * @param {Context} context
 */
export function KeyBlock(node, context) {
	validate_block_not_empty(node.fragment, context);

	if (context.state.analysis.runes) {
		validate_opening_tag(node, context.state, '#');
	}

	mark_subtree_dynamic(context.path);

	context.visit(node.expression, { ...context.state, expression: node.metadata.expression });
	context.visit(node.fragment);
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does KeyBlock.js do?
KeyBlock.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in KeyBlock.js?
KeyBlock.js defines 1 function(s): KeyBlock.
What does KeyBlock.js depend on?
KeyBlock.js imports 5 module(s): fragment.js, mark_subtree_dynamic, utils.js, validate_block_not_empty, validate_opening_tag.
What files import KeyBlock.js?
KeyBlock.js is imported by 1 file(s): index.js.
Where is KeyBlock.js in the architecture?
KeyBlock.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/KeyBlock.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/2-analyze/visitors).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free