Skip to main content

Crate alice_lol_macro

Crate alice_lol_macro 

Source
Expand description

ALICE-LOL proc_macro: LOL DSL → SdfNode construction code

§Syntax (v0.5)

ⓘ
lol! {
    field SceneName {
        smooth_union(0.2,
            sphere(1.0),
            translate(2.0, 0.0, 0.0,
                box3d(0.5, 0.5, 0.5)
            )
        )
    }
}

Also supports bare expressions without the field wrapper:

ⓘ
lol! { sphere(1.0) }

Runtime variable capture with {expr} in numeric positions:

ⓘ
let r = 1.5_f32;
lol! { sphere({r}) }
lol! { translate({x}, {y}, 0.0, sphere({r * 2.0})) }

§Module 構成 (private)

  • ast — LOL Internal AST (Expr enum + variants)
  • parser — Parser (LOL DSL → Expr AST)
  • codegen — Codegen (Expr → Rust TokenStream)

proc_macro crate は 1 entry point (lol!) のみ export、 backward compat 用の re-export は不要 (macro invocation は変わらない)

Macros§

lol
LOL (Law-Oriented Language) proc_macro.