Home / File/ text.js — svelte Source File

text.js — svelte Source File

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

File javascript Compiler Transformer 2 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd["text.js"]
  06660fad_daa2_c824_01c8_ebafc63758a1["html.js"]
  6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd --> 06660fad_daa2_c824_01c8_ebafc63758a1
  83712aa1_c83d_1cd5_c47d_1cdb04dd210c["decode_character_references"]
  6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd --> 83712aa1_c83d_1cd5_c47d_1cdb04dd210c
  dfa8063d_386c_c684_c67f_bfc5fd540f78["fragment.js"]
  dfa8063d_386c_c684_c67f_bfc5fd540f78 --> 6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd
  style 6b133d64_dd9e_dc63_5b9b_73e9e80bc0dd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import { AST } from '#compiler' */
/** @import { Parser } from '../index.js' */
import { decode_character_references } from '../utils/html.js';

/** @param {Parser} parser */
export default function text(parser) {
	const start = parser.index;

	let data = '';

	while (parser.index < parser.template.length && !parser.match('<') && !parser.match('{')) {
		data += parser.template[parser.index++];
	}

	/** @type {AST.Text} */
	parser.append({
		type: 'Text',
		start,
		end: parser.index,
		raw: data,
		data: decode_character_references(data, false)
	});
}

Domain

Subdomains

Functions

Frequently Asked Questions

What does text.js do?
text.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 text.js?
text.js defines 1 function(s): text.
What does text.js depend on?
text.js imports 2 module(s): decode_character_references, html.js.
What files import text.js?
text.js is imported by 1 file(s): fragment.js.
Where is text.js in the architecture?
text.js is located at packages/svelte/src/compiler/phases/1-parse/state/text.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/1-parse/state).

Analyze Your Own Codebase

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

Try Supermodel Free