read_block_item() — svelte Function Reference
Architecture documentation for the read_block_item() function in style.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD b72c2083_31ae_feed_8216_d263cace4b10["read_block_item()"] 251e2338_f8b8_69b4_b2e5_29ee7decbfa6["style.js"] b72c2083_31ae_feed_8216_d263cace4b10 -->|defined in| 251e2338_f8b8_69b4_b2e5_29ee7decbfa6 880a32a4_ea32_dd22_0d38_a206a327356e["read_block()"] 880a32a4_ea32_dd22_0d38_a206a327356e -->|calls| b72c2083_31ae_feed_8216_d263cace4b10 53e6c97d_9ffd_d8ad_0e88_afabeb05753a["read_at_rule()"] b72c2083_31ae_feed_8216_d263cace4b10 -->|calls| 53e6c97d_9ffd_d8ad_0e88_afabeb05753a 998e5052_9be5_2c73_14b0_84ce50994d42["read_value()"] b72c2083_31ae_feed_8216_d263cace4b10 -->|calls| 998e5052_9be5_2c73_14b0_84ce50994d42 1ea28e91_1a56_629a_4392_75e7a2e27b72["read_rule()"] b72c2083_31ae_feed_8216_d263cace4b10 -->|calls| 1ea28e91_1a56_629a_4392_75e7a2e27b72 883f8dc6_d58a_da13_a1b1_889d3d0b4fa2["read_declaration()"] b72c2083_31ae_feed_8216_d263cace4b10 -->|calls| 883f8dc6_d58a_da13_a1b1_889d3d0b4fa2 style b72c2083_31ae_feed_8216_d263cace4b10 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/1-parse/read/style.js lines 444–457
function read_block_item(parser) {
if (parser.match('@')) {
return read_at_rule(parser);
}
// read ahead to understand whether we're dealing with a declaration or a nested rule.
// this involves some duplicated work, but avoids a try-catch that would disguise errors
const start = parser.index;
read_value(parser);
const char = parser.template[parser.index];
parser.index = start;
return char === '{' ? read_rule(parser) : read_declaration(parser);
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does read_block_item() do?
read_block_item() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/read/style.js.
Where is read_block_item() defined?
read_block_item() is defined in packages/svelte/src/compiler/phases/1-parse/read/style.js at line 444.
What does read_block_item() call?
read_block_item() calls 4 function(s): read_at_rule, read_declaration, read_rule, read_value.
What calls read_block_item()?
read_block_item() is called by 1 function(s): read_block.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free