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
/// Minimal test for Self:: function call parse error
/// Issue: Parser fails with "Expected LBrace" when calling Self::method()

writer TestSelfCall {

    fn is_valid(name: &Str) -> bool {
        !name.is_empty()
    }

    fn visit_identifier(node: &Identifier) {
        // Test Self:: function call
        if Self::is_valid(&node.name) {
            self.output.write("valid");
        }
    }
}