diff --git a/Cargo.lock b/Cargo.lock index 0349f6c..b6e6d2d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,6 +186,15 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +[[package]] +name = "parser" +version = "0.1.0" +dependencies = [ + "chumsky", + "insta", + "logos", +] + [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -305,16 +314,7 @@ dependencies = [ name = "ub" version = "0.1.0" dependencies = [ - "ub_parser", -] - -[[package]] -name = "ub_parser" -version = "0.1.0" -dependencies = [ - "chumsky", - "insta", - "logos", + "parser", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8665360..3b8d2e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [".", "./ub_parser"] +members = [".", "./parser"] [package] name = "ub" @@ -9,4 +9,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -ub_parser = { path = "./ub_parser" } \ No newline at end of file +parser = { path = "./parser" } \ No newline at end of file diff --git a/ub_parser/Cargo.toml b/parser/Cargo.toml similarity index 92% rename from ub_parser/Cargo.toml rename to parser/Cargo.toml index 680a077..d1861db 100644 --- a/ub_parser/Cargo.toml +++ b/parser/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ub_parser" +name = "parser" version = "0.1.0" edition = "2021" diff --git a/ub_parser/src/ast.rs b/parser/src/ast.rs similarity index 100% rename from ub_parser/src/ast.rs rename to parser/src/ast.rs diff --git a/ub_parser/src/lexer.rs b/parser/src/lexer.rs similarity index 100% rename from ub_parser/src/lexer.rs rename to parser/src/lexer.rs diff --git a/ub_parser/src/lib.rs b/parser/src/lib.rs similarity index 100% rename from ub_parser/src/lib.rs rename to parser/src/lib.rs diff --git a/ub_parser/src/parser.rs b/parser/src/parser.rs similarity index 100% rename from ub_parser/src/parser.rs rename to parser/src/parser.rs diff --git a/ub_parser/src/snapshots/ub_parser__lexer__tests__idents.snap b/parser/src/snapshots/parser__lexer__tests__idents.snap similarity index 74% rename from ub_parser/src/snapshots/ub_parser__lexer__tests__idents.snap rename to parser/src/snapshots/parser__lexer__tests__idents.snap index ebf4642..5b20531 100644 --- a/ub_parser/src/snapshots/ub_parser__lexer__tests__idents.snap +++ b/parser/src/snapshots/parser__lexer__tests__idents.snap @@ -1,5 +1,6 @@ --- -source: ub_parser/src/lexer.rs +source: parser/src/lexer.rs +assertion_line: 125 expression: tokens --- [ diff --git a/ub_parser/src/snapshots/ub_parser__lexer__tests__keywords.snap b/parser/src/snapshots/parser__lexer__tests__keywords.snap similarity index 69% rename from ub_parser/src/snapshots/ub_parser__lexer__tests__keywords.snap rename to parser/src/snapshots/parser__lexer__tests__keywords.snap index 1fce087..7e8da21 100644 --- a/ub_parser/src/snapshots/ub_parser__lexer__tests__keywords.snap +++ b/parser/src/snapshots/parser__lexer__tests__keywords.snap @@ -1,5 +1,6 @@ --- -source: ub_parser/src/lexer.rs +source: parser/src/lexer.rs +assertion_line: 137 expression: tokens --- [ diff --git a/ub_parser/src/snapshots/ub_parser__lexer__tests__literals.snap b/parser/src/snapshots/parser__lexer__tests__literals.snap similarity index 80% rename from ub_parser/src/snapshots/ub_parser__lexer__tests__literals.snap rename to parser/src/snapshots/parser__lexer__tests__literals.snap index 6de01fe..2b3008e 100644 --- a/ub_parser/src/snapshots/ub_parser__lexer__tests__literals.snap +++ b/parser/src/snapshots/parser__lexer__tests__literals.snap @@ -1,5 +1,6 @@ --- -source: ub_parser/src/lexer.rs +source: parser/src/lexer.rs +assertion_line: 131 expression: tokens --- [ diff --git a/ub_parser/src/snapshots/ub_parser__lexer__tests__punctuation.snap b/parser/src/snapshots/parser__lexer__tests__punctuation.snap similarity index 91% rename from ub_parser/src/snapshots/ub_parser__lexer__tests__punctuation.snap rename to parser/src/snapshots/parser__lexer__tests__punctuation.snap index 51f76d5..7307403 100644 --- a/ub_parser/src/snapshots/ub_parser__lexer__tests__punctuation.snap +++ b/parser/src/snapshots/parser__lexer__tests__punctuation.snap @@ -1,5 +1,5 @@ --- -source: ub_parser/src/lexer.rs +source: parser/src/lexer.rs assertion_line: 110 expression: tokens --- diff --git a/ub_parser/src/snapshots/ub_parser__lexer__tests__whitespace.snap b/parser/src/snapshots/parser__lexer__tests__whitespace.snap similarity index 50% rename from ub_parser/src/snapshots/ub_parser__lexer__tests__whitespace.snap rename to parser/src/snapshots/parser__lexer__tests__whitespace.snap index 7582c2c..1b87fa3 100644 --- a/ub_parser/src/snapshots/ub_parser__lexer__tests__whitespace.snap +++ b/parser/src/snapshots/parser__lexer__tests__whitespace.snap @@ -1,5 +1,6 @@ --- -source: ub_parser/src/lexer.rs +source: parser/src/lexer.rs +assertion_line: 119 expression: tokens --- [ diff --git a/ub_parser/src/snapshots/ub_parser__parser__tests__addition.snap b/parser/src/snapshots/parser__parser__tests__addition.snap similarity index 94% rename from ub_parser/src/snapshots/ub_parser__parser__tests__addition.snap rename to parser/src/snapshots/parser__parser__tests__addition.snap index 0f86afb..fe5cc4a 100644 --- a/ub_parser/src/snapshots/ub_parser__parser__tests__addition.snap +++ b/parser/src/snapshots/parser__parser__tests__addition.snap @@ -1,12 +1,12 @@ --- -source: ub_parser/src/parser.rs +source: parser/src/parser.rs assertion_line: 272 expression: r --- ( Some( File { - name: "ub_parser__parser__tests", + name: "parser__parser__tests", items: [ FnDecl( FnDecl { diff --git a/ub_parser/src/snapshots/ub_parser__parser__tests__expression.snap b/parser/src/snapshots/parser__parser__tests__expression.snap similarity index 96% rename from ub_parser/src/snapshots/ub_parser__parser__tests__expression.snap rename to parser/src/snapshots/parser__parser__tests__expression.snap index 043341f..1aae64f 100644 --- a/ub_parser/src/snapshots/ub_parser__parser__tests__expression.snap +++ b/parser/src/snapshots/parser__parser__tests__expression.snap @@ -1,12 +1,12 @@ --- -source: ub_parser/src/parser.rs +source: parser/src/parser.rs assertion_line: 278 expression: r --- ( Some( File { - name: "ub_parser__parser__tests", + name: "parser__parser__tests", items: [ FnDecl( FnDecl { diff --git a/ub_parser/src/snapshots/ub_parser__parser__tests__function.snap b/parser/src/snapshots/parser__parser__tests__function.snap similarity index 95% rename from ub_parser/src/snapshots/ub_parser__parser__tests__function.snap rename to parser/src/snapshots/parser__parser__tests__function.snap index 4b6430d..a7101f9 100644 --- a/ub_parser/src/snapshots/ub_parser__parser__tests__function.snap +++ b/parser/src/snapshots/parser__parser__tests__function.snap @@ -1,12 +1,12 @@ --- -source: ub_parser/src/parser.rs +source: parser/src/parser.rs assertion_line: 284 expression: r --- ( Some( File { - name: "ub_parser__parser__tests", + name: "parser__parser__tests", items: [ FnDecl( FnDecl { diff --git a/ub_parser/src/snapshots/ub_parser__parser__tests__struct_.snap b/parser/src/snapshots/parser__parser__tests__struct_.snap similarity index 91% rename from ub_parser/src/snapshots/ub_parser__parser__tests__struct_.snap rename to parser/src/snapshots/parser__parser__tests__struct_.snap index 98ef9cc..747e457 100644 --- a/ub_parser/src/snapshots/ub_parser__parser__tests__struct_.snap +++ b/parser/src/snapshots/parser__parser__tests__struct_.snap @@ -1,12 +1,12 @@ --- -source: ub_parser/src/parser.rs -assertion_line: 290 +source: parser/src/parser.rs +assertion_line: 302 expression: r --- ( Some( File { - name: "ub_parser__parser__tests", + name: "parser__parser__tests", items: [ StructDecl( StructDecl {