This PR gets the basics of block definition compilation working. Two aspects of block definition files are omitted from this PR (inherited-styles and conflict resolutions). These aspects are important for pre-compilation but don't block our current project.
In this PR I introduce a CSS-Blocks specific AST that describes both legal CSS Block files as well as legal Block Definition Files. I use this AST first to construct a partial CSS Block AST during block parsing this is then "mapped" to a definition AST during block compilation. The rest of the AST is built up by examining the Block data model. Once the block definition AST is constructed I use an AST visitor to create the postcss AST which is then stringified.
This PR gets the basics of block definition compilation working. Two aspects of block definition files are omitted from this PR (
inherited-styles
and conflict resolutions). These aspects are important for pre-compilation but don't block our current project.In this PR I introduce a CSS-Blocks specific AST that describes both legal CSS Block files as well as legal Block Definition Files. I use this AST first to construct a partial CSS Block AST during block parsing this is then "mapped" to a definition AST during block compilation. The rest of the AST is built up by examining the Block data model. Once the block definition AST is constructed I use an AST visitor to create the postcss AST which is then stringified.