oxc/crates/oxc_query
u9g 8e6f84c40d
feat(query): Add new types (#770)
```diff
+ Array
+ Array implements HasSpan
+ Array implements Expression
+ Array.elements

+ ArrayAST
+ ArrayAST implements Expression
+ ArrayAST implements ASTNode
+ ArrayAST implements HasSpan
+ ArrayAST implements Array

+ ArrayElement
+ ArrayElement implements HasSpan

+ ArrayElementAST
+ ArrayElementAST implements HasSpan
+ ArrayElementAST implements ASTNode

+ File.expression

+ StringLiteral
+ StringLiteral implements Expression
+ StringLiteral implements HasSpan

+ StringLiteralAST
+ StringLiteralAST implements Expression
+ StringLiteralAST implements ASTNode
+ StringLiteralAST implements HasSpan
+ StringLiteralAST implements StringLiteral

+ TemplateLiteral
+ TemplateLiteral implements HasSpan
+ TemplateLiteral implements Expression

+ TemplateLiteralAST
+ TemplateLiteralAST implements ASTNode
+ TemplateLiteralAST implements TemplateLiteral
+ TemplateLiteralAST implements Expression
+ TemplateLiteralAST implements HasSpan

```
2023-08-21 03:50:05 +00:00
..
examples fix(parser,semantic): make semantic own Trivias (#711) 2023-08-10 15:30:32 +08:00
src feat(query): Add new types (#770) 2023-08-21 03:50:05 +00:00
Cargo.toml chore: clean up Cargo.toml with cargo machete (#767) 2023-08-20 15:29:09 +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.