From a060f1983fc5901c1fbf876cb499244d16e64432 Mon Sep 17 00:00:00 2001 From: veradec Date: Fri, 11 Sep 2026 20:42:34 +0530 Subject: add: readme --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 34 ++++++++++++++++++++++++++++++++++ src/main.rs | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/Cargo.lock b/Cargo.lock index 8d4eef1..d9dedbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -182,7 +182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] -name = "okaml-rs" +name = "okaml" version = "0.1.0" dependencies = [ "env_logger", diff --git a/Cargo.toml b/Cargo.toml index f4c0985..0c0422f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "okaml-rs" +name = "okaml" description = "Rust Parser for Okaml Markup Language" readme = "README.md" repository = "https://github.com/lang-okaml/okaml-rs" diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a10858 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# okaml-rs + +okaml-rs is a Rust library for parsing [okaml](github.com/lang-okaml). + +## Installation + +Use the package manager [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) to install foobar. + +```bash +cargo add okaml +``` + +## Usage + +```rust +use okaml; + +fn main() { + let file_path = "../example/syntax.okml"; + let parsed_tree:Vec = Okml::read_from_file(file_path); + println!("{:?}", parsed_ast); +} +``` + +## Contributing + +Pull requests are welcome. For major changes, please open an issue first +to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License + +[MIT](https://choosealicense.com/licenses/mit/) diff --git a/src/main.rs b/src/main.rs index 4a0886b..c780348 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,7 +234,7 @@ fn parse_list(tokens: Vec<&str>, mut index: usize) -> (Vec, usize) { (parent, index) } - +// Driver Code fn main() { let file_path = "../example/syntax.okml"; let parsed_ast:Vec = Okml::read_from_file(file_path); -- cgit v1.2.3