reluxscript 0.1.4

Write AST transformations once. Compile to Babel, SWC, and beyond.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Simple test for custom AST properties
plugin CustomPropsTest {
    struct State {
        counter: i32,
    }

    fn visit_jsx_element(node: &mut JSXElement, ctx: &Context) {
        // Test string assignment
        node.__hexPath = "0x1234";

        // Test boolean flag
        node.__processed = true;

        // Test integer assignment
        node.__count = 42;
    }
}