Skip to content

Commit

Permalink
[Misc]: WIP README
Browse files Browse the repository at this point in the history
  • Loading branch information
0xOmarA committed Apr 25, 2024
1 parent 2a96d9a commit b4987f3
Show file tree
Hide file tree
Showing 8 changed files with 794 additions and 130 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
"rust-analyzer.runnables.extraArgs": [
"--features",
"package-loader/build-time-blueprints"
]
],
"markdown.preview.scrollEditorWithPreview": false,
"markdown.preview.scrollPreviewWithEditor": false
}
320 changes: 318 additions & 2 deletions README.md

Large diffs are not rendered by default.

Binary file modified diagrams/architecture-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified diagrams/architecture-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
588 changes: 467 additions & 121 deletions diagrams/architecture.drawio

Large diffs are not rendered by default.

Binary file added diagrams/architecture1-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added diagrams/architecture1-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions libraries/address-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use proc_macro::*;
use radix_engine_interface::prelude::*;

macro_rules! tri {
macro_rules! r#try {
($expr: expr) => {
match $expr {
Ok(item) => item,
Expand All @@ -34,10 +34,10 @@ macro_rules! impl_address_proc_macro {
paste::paste! {
#[proc_macro]
pub fn [< $type_ident: snake >](item: TokenStream) -> TokenStream {
let literal_string = tri!(syn::parse::<syn::LitStr>(item));
let node_id = tri!(decode_string_into_node_id(&literal_string));
let literal_string = r#try!(syn::parse::<syn::LitStr>(item));
let node_id = r#try!(decode_string_into_node_id(&literal_string));
let node_id_bytes = node_id.0;
let _ = tri!($type_ident::try_from(node_id_bytes).map_err(|err| {
let _ = r#try!($type_ident::try_from(node_id_bytes).map_err(|err| {
syn::Error::new_spanned(&literal_string, format!("{err:?}"))
}));
quote::quote! {
Expand All @@ -59,8 +59,8 @@ impl_address_proc_macro!(GlobalAddress);

#[proc_macro]
pub fn node_id(item: TokenStream) -> TokenStream {
let literal_string = tri!(syn::parse::<syn::LitStr>(item));
let node_id = tri!(decode_string_into_node_id(&literal_string));
let literal_string = r#try!(syn::parse::<syn::LitStr>(item));
let node_id = r#try!(decode_string_into_node_id(&literal_string));
let node_id_bytes = node_id.0;

quote::quote! {
Expand Down

0 comments on commit b4987f3

Please sign in to comment.