import { createCssBuilder } from './createCssBuilder' ; import { createTokenizer } from './createTokenizer' ; import { processStyleBlock } from './processStyleBlock' ; export type Compiler = { compile ( styleSelector , styleString ) : string ; } ; export function createCompiler ( ) { return { compile ( styleSelector , styleString ) { const cssBuilder = createCssBuilder ( ) ; const tokenizer = createTokenizer ( styleString ) ; cssBuilder . openBlock ( [ styleSelector ] ) ; processStyleBlock ( cssBuilder , tokenizer , [ styleSelector ] , false ) ; cssBuilder . closeBlock ( ) ; return cssBuilder . build ( ) . trim ( ) ; } , } ; }