read_identifier() — svelte Function Reference
Architecture documentation for the read_identifier() function in style.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307["read_identifier()"] 251e2338_f8b8_69b4_b2e5_29ee7decbfa6["style.js"] 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 -->|defined in| 251e2338_f8b8_69b4_b2e5_29ee7decbfa6 53e6c97d_9ffd_d8ad_0e88_afabeb05753a["read_at_rule()"] 53e6c97d_9ffd_d8ad_0e88_afabeb05753a -->|calls| 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 fcabd261_14f2_2647_3794_39b7100eda95["read_selector()"] fcabd261_14f2_2647_3794_39b7100eda95 -->|calls| 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 774b1b65_7dad_02c2_b4ca_c77fc0d799ec["read_attribute()"] 774b1b65_7dad_02c2_b4ca_c77fc0d799ec -->|calls| 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 0a2d5c71_e630_94de_fdd2_227628d4c42c["css_expected_identifier()"] 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 -->|calls| 0a2d5c71_e630_94de_fdd2_227628d4c42c style 7a0ffc5c_c833_ca6c_fe33_60f0f57e9307 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/1-parse/read/style.js lines 574–610
function read_identifier(parser) {
const start = parser.index;
let identifier = '';
if (parser.match_regex(REGEX_LEADING_HYPHEN_OR_DIGIT)) {
e.css_expected_identifier(start);
}
while (parser.index < parser.template.length) {
const char = parser.template[parser.index];
if (char === '\\') {
const sequence = parser.match_regex(REGEX_UNICODE_SEQUENCE);
if (sequence) {
identifier += String.fromCodePoint(parseInt(sequence.slice(1), 16));
parser.index += sequence.length;
} else {
identifier += '\\' + parser.template[parser.index + 1];
parser.index += 2;
}
} else if (
/** @type {number} */ (char.codePointAt(0)) >= 160 ||
REGEX_VALID_IDENTIFIER_CHAR.test(char)
) {
identifier += char;
parser.index++;
} else {
break;
}
}
if (identifier === '') {
e.css_expected_identifier(start);
}
return identifier;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does read_identifier() do?
read_identifier() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/read/style.js.
Where is read_identifier() defined?
read_identifier() is defined in packages/svelte/src/compiler/phases/1-parse/read/style.js at line 574.
What does read_identifier() call?
read_identifier() calls 1 function(s): css_expected_identifier.
What calls read_identifier()?
read_identifier() is called by 3 function(s): read_at_rule, read_attribute, read_selector.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free