Home / Function/ read_selector_list() — svelte Function Reference

read_selector_list() — svelte Function Reference

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

Function javascript Compiler Transformer calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  a2faeba8_5477_23ae_005c_e02d8e7f69c1["read_selector_list()"]
  251e2338_f8b8_69b4_b2e5_29ee7decbfa6["style.js"]
  a2faeba8_5477_23ae_005c_e02d8e7f69c1 -->|defined in| 251e2338_f8b8_69b4_b2e5_29ee7decbfa6
  1ea28e91_1a56_629a_4392_75e7a2e27b72["read_rule()"]
  1ea28e91_1a56_629a_4392_75e7a2e27b72 -->|calls| a2faeba8_5477_23ae_005c_e02d8e7f69c1
  fcabd261_14f2_2647_3794_39b7100eda95["read_selector()"]
  fcabd261_14f2_2647_3794_39b7100eda95 -->|calls| a2faeba8_5477_23ae_005c_e02d8e7f69c1
  ae0c2614_bb2e_88b4_b84e_1fd1d9fd582b["allow_comment_or_whitespace()"]
  a2faeba8_5477_23ae_005c_e02d8e7f69c1 -->|calls| ae0c2614_bb2e_88b4_b84e_1fd1d9fd582b
  fcabd261_14f2_2647_3794_39b7100eda95["read_selector()"]
  a2faeba8_5477_23ae_005c_e02d8e7f69c1 -->|calls| fcabd261_14f2_2647_3794_39b7100eda95
  feea79ed_c6f7_4068_9c81_9734e5dcbfb7["unexpected_eof()"]
  a2faeba8_5477_23ae_005c_e02d8e7f69c1 -->|calls| feea79ed_c6f7_4068_9c81_9734e5dcbfb7
  style a2faeba8_5477_23ae_005c_e02d8e7f69c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/1-parse/read/style.js lines 128–157

function read_selector_list(parser, inside_pseudo_class = false) {
	/** @type {AST.CSS.ComplexSelector[]} */
	const children = [];

	allow_comment_or_whitespace(parser);

	const start = parser.index;

	while (parser.index < parser.template.length) {
		children.push(read_selector(parser, inside_pseudo_class));

		const end = parser.index;

		allow_comment_or_whitespace(parser);

		if (inside_pseudo_class ? parser.match(')') : parser.match('{')) {
			return {
				type: 'SelectorList',
				start,
				end,
				children
			};
		} else {
			parser.eat(',', true);
			allow_comment_or_whitespace(parser);
		}
	}

	e.unexpected_eof(parser.template.length);
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free