Skip to content

Commit

Permalink
Add link to docs.rs for cairo-lang-macro (#1496)
Browse files Browse the repository at this point in the history
commit-id:f1a5ffa4

---

**Stack**:
- #1497
- #1496⚠️ *Part of a stack created by [spr](https://github.com/ejoffe/spr). Do
not merge manually using the UI - doing so may have unexpected results.*
  • Loading branch information
maciektr authored Jul 31, 2024
1 parent b179da5 commit 4c77546
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/docs/reference/procedural-macro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ In general, this allows writing expressions (`macro!()`), attributes (`#[macro]`
macros (`#[derive(Macro)]`) that transform Cairo code in your package.
This transformations can be loaded dynamically per compilation unit as dependencies.

### Procedural macro API interface

<BigLink href="https://docs.rs/cairo-lang-macro">
Go to cairo-lang-macro documentation on docs.rs
</BigLink>

## Guide-level explanation

### Procedural macro user perspective
Expand Down Expand Up @@ -126,6 +132,8 @@ These three macro helpers are:
3. #[`derive_macro`] - Implements a derive macro. Should be used on function that accepts single token stream, the item
the derive is applied to. Note that derives cannot replace the original item, but rather add new items to the module.

Please review the [`cairo-lang-macro` documentation](https://docs.rs/cairo-lang-macro) for more information.

### Parsing token streams

To parse Cairo code, you can use the `cairo-lang-parser` crate, defined in the Cairo compiler repository and available
Expand Down

0 comments on commit 4c77546

Please sign in to comment.