bem-0.1.0 is not a library.
Visit the last successful build:
bem-0.2.7
BEM Parser
A Rust-based parser for the BEM file format, utilizing the Pest parsing library.
Overview
This parser provides functionality to parse BEM (Block Element Modifier) notations, primarily used in CSS methodologies for naming classes in HTML. With this parser, you can interpret and work with BEM notations programmatically in Rust.
Features
- Parse BEM blocks, elements, and modifiers.
- Support for single dashes in names.
- Robust error handling with detailed parsing error messages.
- Lightweight and efficient parsing using Pest.
Getting Started
Prerequisites
Ensure you have Rust and Cargo installed:
|
Installation
Add bem to your Cargo.toml:
[]
= "0.1.0"
Usage
Here's a simple example:
use BEMParser;
let bem_content = "media-player(dark|light)\nbutton(fast-forward|rewind)\ntimeline";
let parsed = parse.expect;
// Process the parsed content...
for pair in parsed
Contributing
Feel free to open issues or pull requests if you have suggestions, improvements, or fixes.
License
MIT License. See LICENSE for details.