Home / Function/ read_body() — svelte Function Reference

read_body() — svelte Function Reference

Architecture documentation for the read_body() function in style.js from the svelte codebase.

Function javascript Compiler Transformer calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  94e530df_408d_ac7a_c243_1709ce77053c["read_body()"]
  251e2338_f8b8_69b4_b2e5_29ee7decbfa6["style.js"]
  94e530df_408d_ac7a_c243_1709ce77053c -->|defined in| 251e2338_f8b8_69b4_b2e5_29ee7decbfa6
  ed89faef_4ddb_7d55_bba6_cc8feba73758["read_style()"]
  ed89faef_4ddb_7d55_bba6_cc8feba73758 -->|calls| 94e530df_408d_ac7a_c243_1709ce77053c
  17b060ee_9bdd_d2ea_9bd7_f190c36179db["parse_stylesheet()"]
  17b060ee_9bdd_d2ea_9bd7_f190c36179db -->|calls| 94e530df_408d_ac7a_c243_1709ce77053c
  ae0c2614_bb2e_88b4_b84e_1fd1d9fd582b["allow_comment_or_whitespace()"]
  94e530df_408d_ac7a_c243_1709ce77053c -->|calls| ae0c2614_bb2e_88b4_b84e_1fd1d9fd582b
  53e6c97d_9ffd_d8ad_0e88_afabeb05753a["read_at_rule()"]
  94e530df_408d_ac7a_c243_1709ce77053c -->|calls| 53e6c97d_9ffd_d8ad_0e88_afabeb05753a
  1ea28e91_1a56_629a_4392_75e7a2e27b72["read_rule()"]
  94e530df_408d_ac7a_c243_1709ce77053c -->|calls| 1ea28e91_1a56_629a_4392_75e7a2e27b72
  style 94e530df_408d_ac7a_c243_1709ce77053c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/1-parse/read/style.js lines 53–66

function read_body(parser, finished) {
	/** @type {Array<AST.CSS.Rule | AST.CSS.Atrule>} */
	const children = [];

	while ((allow_comment_or_whitespace(parser), !finished(parser))) {
		if (parser.match('@')) {
			children.push(read_at_rule(parser));
		} else {
			children.push(read_rule(parser));
		}
	}

	return children;
}

Domain

Subdomains

Frequently Asked Questions

What does read_body() do?
read_body() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/read/style.js.
Where is read_body() defined?
read_body() is defined in packages/svelte/src/compiler/phases/1-parse/read/style.js at line 53.
What does read_body() call?
read_body() calls 3 function(s): allow_comment_or_whitespace, read_at_rule, read_rule.
What calls read_body()?
read_body() is called by 2 function(s): parse_stylesheet, read_style.

Analyze Your Own Codebase

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

Try Supermodel Free