oxc/crates/oxc_query
u9g 29ddca52b7
chore(query): condense XAST and X resolvers into one (#663)
No need to needlessly duplicate code.

**Future work:**

1. remove any breakout function that calls getspan...
2. maybe: make every type that can implement span (why don't we already)
2023-07-30 11:34:34 -04:00
..
examples Add oxc_query crate (#625) 2023-07-26 13:03:00 +08:00
src chore(query): condense XAST and X resolvers into one (#663) 2023-07-30 11:34:34 -04:00
Cargo.toml chore(rust): update crate info, add minimal rust-version, add categories 2023-07-27 13:33:18 +08:00
README.md Add oxc_query crate (#625) 2023-07-26 13:03:00 +08:00

oxc_query

What is this?

oxc_query is a trustfall adapter which can be used for querying data about code.

Example: Query the name of every variable declared in a js/ts/tsx file

query {
    File {
        variable_declaration {
            left {
                assignment_to_variable_name @filter(op: "is_not_null") @output # we filter not null because destructured variables will be null when outputted on this edge.
            }
        }
    }
}

Hint: See example/simple.rs for how to run this query.