diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ae4b5..ab380ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## TODO +- Parse multiple statements +- Parse binary operators - Parse more complex bindings - Parse block of code - Watch mode @@ -17,6 +19,8 @@ ## v0.0.7 - Parse minimal function declarations following a grammar +- Parse function call, binding as statement +- Parse a statement as body of a function declaration ## v0.0.6 diff --git a/Cargo.lock b/Cargo.lock index 3d056be..cb53a5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -254,7 +254,7 @@ dependencies = [ [[package]] name = "thp" -version = "0.0.6" +version = "0.0.7" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index edab557..2ba9cba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thp" -version = "0.0.6" +version = "0.0.7" edition = "2021" diff --git a/src/main.rs b/src/main.rs index baf544d..2539f7f 100755 --- a/src/main.rs +++ b/src/main.rs @@ -32,12 +32,11 @@ enum Commands { R {}, } -const VERSION: &str = "0.0.6"; - fn get_copyright() -> String { + let crate_version = env!("CARGO_PKG_VERSION"); format!( "THP {}\nCopyright (c) 2023 Fernando Enrique Araoz Morales\n", - VERSION, + crate_version, ) } diff --git a/src/syntax/grammar.md b/src/syntax/grammar.md index 9a97fc7..e48435b 100644 --- a/src/syntax/grammar.md +++ b/src/syntax/grammar.md @@ -45,7 +45,7 @@ block = "{", (statement, (new line, statement)*)?, "}" ### Statement ```ebnf -statement = function call +statement = function call | binding ``` diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index cd78397..d779b95 100755 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -5,8 +5,8 @@ mod block; mod expression; mod functions; mod params_list; -mod statement; mod utils; +mod statement; pub mod ast;