Skip to content

Commit

Permalink
add semantics crate
Browse files Browse the repository at this point in the history
  • Loading branch information
SkymanOne committed Feb 5, 2024
1 parent 4ccff93 commit 81b6161
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/semantics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "folidity-semantics"
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
version.workspace = true


[dependencies]
14 changes: 14 additions & 0 deletions crates/semantics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 81b6161

Please sign in to comment.