- Move .mrs files into misses-compiler/examples/ alongside .rs runners - Add lib.rs exposing parse/codegen for use by example binaries and main.rs - Fix parser: #[attr] vs #[a => b] disambiguation (look for => before ]) - Fix parser: `for` keyword in `impl Foo for Bar` no longer triggers spread (is_spread_for lookahead: must match `for <ident> in $<ident> =>`) - Add derive_getters.mrs: getter methods via spread iteration - Add make_id_type.mrs: newtype u64 wrapper with From impls, derive attrs Run with: cargo run --example hello|derive_builder|declare_table|derive_getters|make_id_type https://claude.ai/code/session_01Tppkab4eLsL21asHGjQJoF
12 lines
276 B
Plaintext
12 lines
276 B
Plaintext
// hello.mrs — smoke test
|
|
// Demonstrates: single ident binding, ident construction with #[a => b]
|
|
macro hello! {
|
|
$name:ident => {
|
|
T~{
|
|
pub fn #[say => $name]() -> &'static str {
|
|
"hello from the macro!"
|
|
}
|
|
}
|
|
}
|
|
}
|