aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorveradec <glitchmill.dyj3d@simplelogin.co>2026-09-11 20:42:34 +0530
committerveradec <glitchmill.dyj3d@simplelogin.co>2026-09-11 20:42:34 +0530
commita060f1983fc5901c1fbf876cb499244d16e64432 (patch)
tree39eac83845e7aaf3da090c49062377917b5e2281
parentef4bce5a1d9c63f9ae8b1eba2796fa99c2d85ab2 (diff)
add: readme
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--README.md34
-rw-r--r--src/main.rs2
4 files changed, 37 insertions, 3 deletions
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> = 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<Okml>, usize) {
(parent, index)
}
-
+// Driver Code
fn main() {
let file_path = "../example/syntax.okml";
let parsed_ast:Vec<Okml> = Okml::read_from_file(file_path);