Boshen
a455c81db6
fix(linter): revert changes to JSX attribute strings ( #1101 )
2023-10-30 15:26:04 +08:00
Boshen
6295f9ce18
fix(ast): jsx attribute value and text child should be jsx string ( #1089 )
2023-10-29 15:32:24 +08:00
Boshen
af1a76bafa
feat(transformer): implement some of needs_explicit_esm for typescript ( #1047 )
...
Co-authored-by: magic-akari <akari.ccino@gmail.com>
2023-10-24 17:30:01 +08:00
Boshen
db5417f9a9
refactor(clippy): allow clippy::too_many_lines
2023-10-16 15:18:11 +08:00
Boshen
817f8c295e
ci: turn off doc tests because they are slow to compile and run ( #961 )
2023-10-07 17:01:23 +08:00
u9g
ed60c106b4
fix(query): fix UnaryExpression.operator ( #859 )
2023-09-05 06:04:14 +00:00
u9g
05bb29a11e
feat(query): Add fields ( #807 )
...
```diff
+ Expression.or_value_at_declaration
+ Function.body
```
2023-08-28 13:56:05 +08:00
u9g
ad05e196cf
feat(query): Fix Spread typename ( #797 )
2023-08-26 10:50:21 +08:00
u9g
1c6b87b415
feat(query): Unify spread types, add ExpressionArrayElement, and ancestors is nullish now ( #788 )
...
```diff
- ArrayElementAST
- SpreadArrayElement
- SpreadArrayElementAST
- SpreadIntoObject
- SpreadIntoObjectAST
+ ExpressionArrayElement
+ ExpressionArrayElement implements HasSpan
+ ExpressionArrayElement implements ArrayElement
+ ExpressionArrayElement.expression
+ ExpressionArrayElementAST
+ ExpressionArrayElementAST implements ArrayElement
+ ExpressionArrayElementAST implements HasSpan
+ ExpressionArrayElementAST implements ExpressionArrayElement
+ Spread
+ Spread implements ObjectProperty
+ Spread implements ArrayElement
+ Spread implements HasSpan
+ Spread.expression
+ SpreadAST
+ SpreadAST implements ObjectProperty
+ SpreadAST implements HasSpan
+ SpreadAST implements ArrayElement
+ SpreadAST implements ASTNode
+ SpreadAST implements Spread
```
2023-08-25 13:29:06 +08:00
u9g
e0a85eec01
feat(query): Add fields and new ArrayElement types ( #787 )
...
```diff
- Array.elements
+ Array.element
+ ElidedArrayElement
+ ElidedArrayElement implements ArrayElement
+ ElidedArrayElement implements HasSpan
+ ElidedArrayElementAST
+ ElidedArrayElementAST implements ArrayElement
+ ElidedArrayElementAST implements HasSpan
+ ElidedArrayElementAST implements ElidedArrayElement
+ SpreadArrayElement
+ SpreadArrayElement implements ArrayElement
+ SpreadArrayElement implements HasSpan
+ SpreadArrayElement.spread
+ SpreadArrayElementAST
+ SpreadArrayElementAST implements ArrayElement
+ SpreadArrayElementAST implements HasSpan
+ SpreadArrayElementAST implements SpreadArrayElement
+ VariableDeclarationAST.kind
```
2023-08-24 23:46:00 -04:00
Boshen
2f0ff28f47
Rust 1.72.0 ( #784 )
2023-08-24 23:02:19 +08:00
u9g
4f686b6a75
feat(query): add Paren*Expr* type and add index to Argument type and fix todo in ObjectExpr ( #780 )
...
```diff
+ Argument.index
+ ParenthesizedExpression
+ ParenthesizedExpression implements Expression
+ ParenthesizedExpression implements HasSpan
+ ParenthesizedExpression.expression
+ ParenthesizedExpressionAST
+ ParenthesizedExpressionAST implements Expression
+ ParenthesizedExpressionAST implements HasSpan
+ ParenthesizedExpressionAST implements ParenthesizedExpression
+ ParenthesizedExpressionAST implements ASTNode
```
2023-08-24 04:21:02 +00:00
u9g
89d115704b
feat(query): Add types & Visit Array in AST for ArrayAST type ( #777 )
...
```diff
+ RegExpLiteral
+ RegExpLiteral implements HasSpan
+ RegExpLiteral implements Expression
+ RegExpLiteral.pattern
+ RegExpLiteralAST
+ RegExpLiteralAST implements ASTNode
+ RegExpLiteralAST implements RegExpLiteral
+ RegExpLiteralAST implements HasSpan
+ RegExpLiteralAST implements Expression
```
2023-08-23 09:27:49 -04:00
u9g
2b1e535e6d
feat(query) add declaration field to VarRef ( #774 )
2023-08-22 00:18:32 -04:00
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
Boshen
5152b39b17
chore: clean up Cargo.toml with cargo machete ( #767 )
2023-08-20 15:29:09 +08:00
u9g
3b3babed2e
feat(query): Add types and add field to Argument ( #765 )
...
```diff
+ Argument.is_spread
+ DoWhileStatement
+ DoWhileStatement implements HasSpan
+ DoWhileStatement implements Statement
+ DoWhileStatement.body
+ DoWhileStatement.condition
+ DoWhileStatementAST
+ DoWhileStatementAST implements HasSpan
+ DoWhileStatementAST implements Statement
+ DoWhileStatementAST implements DoWhileStatement
+ DoWhileStatementAST implements ASTNode
+ ForStatement
+ ForStatement implements HasSpan
+ ForStatement implements Statement
+ ForStatement.body
+ ForStatement.step
+ ForStatement.condition
+ ForStatementAST
+ ForStatementAST implements HasSpan
+ ForStatementAST implements Statement
+ ForStatementAST implements ASTNode
+ ForStatementAST implements ForStatement
+ New
+ New implements Expression
+ New implements HasSpan
+ New.callee
+ New.argument
+ NewAST
+ NewAST implements Expression
+ NewAST implements HasSpan
+ NewAST implements New
+ NewAST implements ASTNode
+ TernaryExpression
+ TernaryExpression implements HasSpan
+ TernaryExpression implements Expression
+ TernaryExpression.condition
+ TernaryExpression.if_true
+ TernaryExpression.if_false
+ TernaryExpressionAST
+ TernaryExpressionAST implements TernaryExpression
+ TernaryExpressionAST implements HasSpan
+ TernaryExpressionAST implements ASTNode
+ TernaryExpressionAST implements Expression
+ Throw
+ Throw implements HasSpan
+ Throw implements Expression
+ Throw.to_throw
+ ThrowAST
+ ThrowAST implements HasSpan
+ ThrowAST implements Throw
+ ThrowAST implements ASTNode
+ ThrowAST implements Expression
```
2023-08-20 14:54:25 +08:00
u9g
fd3fa6ca84
feat(query): Add some new types ( #761 )
...
```diff
+ BlockStatement
+ BlockStatement implements HasSpan
+ BlockStatement implements Statement
+ BlockStatement.statement
+ BlockStatementAST
+ BlockStatementAST implements BlockStatement
+ BlockStatementAST implements Statement
+ BlockStatementAST implements ASTNode
+ BlockStatementAST implements HasSpan
+ ExpressionStatement
+ ExpressionStatement implements HasSpan
+ ExpressionStatement implements Statement
+ ExpressionStatement.expression
+ ExpressionStatementAST
+ ExpressionStatementAST implements HasSpan
+ ExpressionStatementAST implements ExpressionStatement
+ ExpressionStatementAST implements ASTNode
+ ExpressionStatementAST implements Statement
+ VarRef
+ VarRef implements HasSpan
+ VarRef implements Expression
+ VarRef.name
+ VarRefAST
+ VarRefAST implements HasSpan
+ VarRefAST implements Expression
+ VarRefAST implements VarRef
+ VarRefAST implements ASTNode
+ WhileStatement
+ WhileStatement implements Statement
+ WhileStatement implements HasSpan
+ WhileStatement.condition
+ WhileStatement.body
+ WhileStatementAST
+ WhileStatementAST implements ASTNode
+ WhileStatementAST implements Statement
+ WhileStatementAST implements WhileStatement
+ WhileStatementAST implements HasSpan
```
2023-08-19 16:15:22 +08:00
u9g
61bf583333
feat(query): New types added ( #754 )
...
```diff
+ LogicalExpression
+ LogicalExpression implements HasSpan
+ LogicalExpression implements Expression
+ LogicalExpression.operator
+ LogicalExpression.left
+ LogicalExpression.right
+ LogicalExpressionAST
+ LogicalExpressionAST implements LogicalExpression
+ LogicalExpressionAST implements ASTNode
+ LogicalExpressionAST implements Expression
+ LogicalExpressionAST implements HasSpan
+ Parameter implements HasSpan
+ UnaryExpression
+ UnaryExpression implements HasSpan
+ UnaryExpression implements Expression
+ UnaryExpression.operator
+ UnaryExpression.value
+ UnaryExpressionAST
+ UnaryExpressionAST implements ASTNode
+ UnaryExpressionAST implements Expression
+ UnaryExpressionAST implements HasSpan
+ UnaryExpressionAST implements UnaryExpression
```
2023-08-18 00:04:52 -04:00
u9g
b346a9ad6d
feat(query): New types and new fields for existing types ( #746 )
...
```diff
+ Argument.value
+ Argument implements HasSpan
+ ArgumentAST
- FnCall.arguments
+ FnCall.argument
- FnCallAST.arguments
+ FnCallAST.argument
+ interface Function
+ Function.is_async
+ Function.is_generator
+ Function.parameter
+ Function implements Expression
+ Function implements HasSpan
+ Parameter
+ Parameter.is_readonly
+ Parameter.assignment
+ Parameter.type_annotation
+ Parameter implements HasSpan
+ ParameterAST
+ ArrowFunction implements Function
+ ArrowFunction implements Expression
+ ArrowFunctionAST implements Function
+ ArrowFunctionAST implements Expression
+ FnDeclaration implements Function
+ FnDeclaration implements Expression
+ FnDeclarationAST implements Function
+ FnDeclarationAST implements Expression
```
2023-08-16 00:56:43 -04:00
u9g
5dc69ea4ec
feat(query): Add many types ( #742 )
2023-08-15 03:30:59 -04:00
u9g
99a7ad4319
feat(query): add FnCall and Argument types ( #737 )
2023-08-14 10:25:03 +08:00
u9g
087abd3cf1
feat(query): Add Reassignment type and add str property to span ( #731 )
2023-08-13 22:18:41 +08:00
u9g
9566378119
feat(query): add many types to oxc_query ( #724 )
...
Adds `Name(AST)?`, `IfStatementAST`, `SpreadIntoObject(AST)?`,
`ObjectEntry(AST)?`, `DotProperty(AST)?` types
Fixes `ObjectLiteral`'s value field's output type
Added `entry` field to `ObjectLiteral(AST)?`
2023-08-12 16:43:58 +08:00
u9g
c6ed90900c
feat(query): Add name to class ( #720 )
2023-08-11 14:36:40 +08:00
u9g
97c5cd379e
feat(query): Add right to VariableDeclaration ( #718 )
2023-08-11 05:40:35 +00:00
u9g
9c05866cc1
feat(query): add NumberLiteral type ( #717 )
2023-08-11 05:37:29 +00:00
u9g
c7fc1d99b5
feat(query): add name to interface ( #716 )
2023-08-11 05:22:12 +00:00
u9g
a953a96529
fix(query): make ObjectLiteralAST implement ObjectLiteral ( #715 )
2023-08-11 05:15:22 +00:00
u9g
99a4816ce7
feat(website): add query playground ( #698 )
2023-08-11 10:53:21 +08:00
Boshen
2f48bdf26f
fix(parser,semantic): make semantic own Trivias ( #711 )
...
closes #708
Making the parser return Rc<Trivias> is not a good API, and ideally
`Semantic` should just own `Trivias` so it can process or mutate it.
2023-08-10 15:30:32 +08:00
u9g
8b7b1381b5
chore(query): abstract away testing boilerplate ( #669 )
2023-07-31 10:05:24 +08:00
u9g
08e78bce16
feat(query): add ast counterpart to JSXOpeningElement ( #668 )
2023-07-30 19:51:25 -04:00
u9g
228cab9269
feat(query): add ast counterpart to ObjectLiteral ( #666 )
2023-07-30 18:15:57 -04:00
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
Boshen
d587065436
chore(rust): update crate info, add minimal rust-version, add categories
2023-07-27 13:33:18 +08:00
Boshen
45c1650631
chore(oxc_query): do not publish yet, it is not ready
2023-07-27 13:17:33 +08:00
Boshen
b34ef4f07a
chore: reformat
2023-07-27 13:11:46 +08:00
Boshen
f2df32d1c0
fix(taplo): adjust the include glob so it doesn't time out searching for files
2023-07-27 12:30:34 +08:00
u9g
34f25b7067
feat(query): adapter invariant test ( #644 )
...
Checks for invariants in the adapter that would certainly error out real
usage, doesn't actually use the data provided to the adapter
2023-07-26 23:59:02 -04:00
u9g
5b0449507e
chore(query): move tests to their own file ( #643 )
2023-07-27 03:41:55 +00:00
u9g
451667acfc
feat(query): impl ASTNode for VariableDeclarationAST ( #639 )
...
also changes from using entire_span to just span so we don't have to
have two properties point at the same span
2023-07-27 11:30:15 +08:00
u9g
997eb26d3e
feat(query): impl Typename for VariableDeclaration ( #638 )
2023-07-27 09:46:49 +08:00
u9g
1d504ac94a
Add oxc_query crate ( #625 )
2023-07-26 13:03:00 +08:00