Skip to main content

Module parse_main

Module parse_main 

Source
Expand description

Port of doParse() / doParseSync() of src/parser/parse.ts.

One async fn serves both, with every feature: do_parse_sync() runs it to completion (a host that returns its values synchronously resolves the @import rules, the css modules, …). The restrictions of the typescript doParseSync() (no import resolution, errors instead of loading css modules, generateSyncScopedName()) are kept by the javascript bindings only, with ParserOptions::sync_api_compat.

Structs§

ParseResult
ParseResult
StrMap
ordered string map (Record<string, string>)

Functions§

do_parse
parse css (doParse()). arena: the arena of the parent parse (nested parses share it)
do_parse_sync
parse css synchronously: do_parse() run to completion. every feature is available; a host callback that returns a pending promise is an error
generate_scoped_name
generateScopedName() (async: the sha hashes are allowed) and generateSyncScopedName()

Type Aliases§

ParseFuture
boxed future (recursive parses)