Skip to content

Commit 21e8fd0

Browse files
committed
feat: add pretty assess
1 parent ca3e747 commit 21e8fd0

21 files changed

+455
-233
lines changed

Cargo.lock

+140-70
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,2 @@
1-
[package]
2-
name = "css-tutorial"
3-
version = "0.1.0"
4-
edition = "2021"
5-
6-
[lib]
7-
crate-type=["cdylib","lib"]
8-
test = true
9-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10-
11-
[dev-dependencies]
12-
criterion = "0.4"
13-
fake = "2.5"
14-
rand = "0.8"
15-
16-
[[bench]]
17-
name = "benchmark"
18-
harness = false
19-
20-
[dependencies]
21-
serde = { version = "1.0", features = ["derive"] }
22-
23-
serde_json = "1.0"
24-
25-
wasm-bindgen = "0.2"
1+
[workspace]
2+
members = ["crates/*"]

benches/benchmark.rs

-101
This file was deleted.

crates/css_tutorial/Cargo.toml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "css_tutorial"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
7+
[lib]
8+
crate-type=["cdylib","lib"]
9+
test = true
10+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
11+
12+
[dev-dependencies]
13+
criterion = "0.4"
14+
fake = "2.5"
15+
rand = "0.8"
16+
pretty_assertions = "1.3.0"
17+
test_tool = { version = "0.1.0", path = "../test_tool" }
18+
19+
20+
[dependencies]
21+
serde = { version = "1.0", features = ["derive"] }
22+
23+
serde_json = "1.0"
24+
25+
wasm-bindgen = "0.2"
File renamed without changes.
File renamed without changes.

crates/css_tutorial/src/lib.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pub mod ast;
2+
pub mod lexer;
3+
pub mod parser;
4+
pub mod range;
5+
pub mod token;
6+
pub mod token_type;
7+
8+
use ast::AstTreeBuilder;
9+
use lexer::Lexer;
10+
use parser::Parser;
11+
use wasm_bindgen::prelude::*;

src/main.rs renamed to crates/css_tutorial/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::fs;
22

3-
use css_tutorial::token_type::TokenType;
43
use css_tutorial::lexer::Lexer;
4+
use css_tutorial::token_type::TokenType;
55
fn main() {
66
let binding = fs::read_to_string("test2.css").unwrap();
77
let mut lexer = Lexer::new(&binding);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a

0 commit comments

Comments
 (0)