mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
update oxc
This commit is contained in:
parent
e61629f89f
commit
ae843301de
4 changed files with 77 additions and 43 deletions
94
rewriter/Cargo.lock
generated
94
rewriter/Cargo.lock
generated
|
@ -866,12 +866,13 @@ checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56"
|
|||
|
||||
[[package]]
|
||||
name = "oxc"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd6be05b94a99c886e3c8f79c0330e746df6fe27f8440b498ea7a5eb2fee2f67"
|
||||
checksum = "5b4a5aba9c3f445db5401f9975266b23a5c5b49a8b4ccb1efa049132e96069dc"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
"oxc_ast_visit",
|
||||
"oxc_diagnostics",
|
||||
"oxc_parser",
|
||||
"oxc_regular_expression",
|
||||
|
@ -906,9 +907,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_allocator"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf460405a383f3f7ac134a0e06afdb3525c8fa8f119453167f179ea6b12faaf6"
|
||||
checksum = "7844c292ad3f79021bf3066538129c662a65bb4235a3450d124edd81bc9094df"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"bumpalo",
|
||||
|
@ -919,15 +920,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_ast"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b273094a3e96e84d3d8ce82190fd7113f70bb2a8dcb652c78b46df79fdd156cc"
|
||||
checksum = "c4005b2e219aa87cb0cbde495bcd6543748a4d77c8583ec573c6db2984bb249f"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cow-utils",
|
||||
"nonmax",
|
||||
"oxc_allocator",
|
||||
"oxc_ast_macros",
|
||||
"oxc_data_structures",
|
||||
"oxc_estree",
|
||||
"oxc_regular_expression",
|
||||
"oxc_span",
|
||||
|
@ -936,9 +937,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_ast_macros"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab1dff20655433e64452ee12a9c87dba5d307a47fc8e155b4e37d746d66b37dd"
|
||||
checksum = "93405fb1ad62247fa9296ad73265671b9c4aaa39dbbe142af00a6de415e61606"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -946,10 +947,32 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_diagnostics"
|
||||
version = "0.52.0"
|
||||
name = "oxc_ast_visit"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "640a5f40eb0e09725a5e9c90e88727272c999d9805403747e2140cab2a742b6e"
|
||||
checksum = "f333b2ae5cbf1328986ce1eca317bc7f2f2e256c3d4a0f72b0d935a30c86b641"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
"oxc_span",
|
||||
"oxc_syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_data_structures"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfc814bebc24ca429f257fba498dee171a98fa2ef1ea0f9c9eb3d69f0993baa6"
|
||||
dependencies = [
|
||||
"assert-unchecked",
|
||||
"ropey",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_diagnostics"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fd1f43ffbdabf86a563b48970c2abdbc0ac860e49558c83ab23a010b1a774f8"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"oxc-miette",
|
||||
|
@ -957,9 +980,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_ecmascript"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87543a59fd0d2d27102ccd8eee9f954564f7e82124992cc21975bbbe75851ce4"
|
||||
checksum = "1a23d0e112ff9ea0f39dd2c9c921f0938e313e26ee9e4022f60c8d81c561e518"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"num-bigint",
|
||||
|
@ -971,24 +994,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_estree"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1efeb3bb8ce6bced1e382e49d3978a2e5067cdc3881584f1cdef5aaf52d28b4"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
]
|
||||
checksum = "dd9818707125125e32d25fd18c5331a4418fbde084e33c69dee123df5b2531d2"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_index"
|
||||
version = "2.0.0"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5eca5d9726cd0a6e433debe003b7bc88b2ecad0bb6109f0cef7c55e692139a34"
|
||||
checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_parser"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0f5195b60a980baf22e34c801c8a37901ee21149e523d2a2fc68111991dd0b6"
|
||||
checksum = "cce20364085569f8caebeb879aec455c5c8f6e5dcb5d0ecfb88208ae5e709331"
|
||||
dependencies = [
|
||||
"assert-unchecked",
|
||||
"bitflags",
|
||||
|
@ -1009,9 +1029,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_regular_expression"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6b7199022f1e8a071a118737884cdf75bd3ba869471fd500f00dd4612a4faeb"
|
||||
checksum = "89e1f1e21ed9b3e4d1c6eb10dffc1c71202e8fe111968cf6636f5484ad443b0b"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast_macros",
|
||||
|
@ -1025,9 +1045,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_span"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3cbaec227f5bb91e52a04f9028915973cbb7522b123b41af2d3189eb1ce41d8"
|
||||
checksum = "e59da8e765f44892357f6b75bdb16f486d61956c5bd92a345429ad704d4853fd"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"oxc-miette",
|
||||
|
@ -1038,9 +1058,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_syntax"
|
||||
version = "0.52.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91bd42fae0c0e6212ea704ed533df47748002abc0af5496911fdb09735028a77"
|
||||
checksum = "47b8bd67fdd8df27cfddbec577b282f1a6601509ecd750697f590d7cdc2d88b7"
|
||||
dependencies = [
|
||||
"assert-unchecked",
|
||||
"bitflags",
|
||||
|
@ -1313,6 +1333,16 @@ dependencies = [
|
|||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ropey"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93411e420bcd1a75ddd1dc3caf18c23155eda2c090631a85af21ba19e97093b5"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
"str_indices",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "2.1.1"
|
||||
|
@ -1432,6 +1462,12 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "str_indices"
|
||||
version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.98"
|
||||
|
|
|
@ -10,7 +10,7 @@ codegen-units = 1
|
|||
panic = "abort"
|
||||
|
||||
[workspace.dependencies]
|
||||
oxc = "0.52.0"
|
||||
oxc = { version = "0.56.0", features = ["ast_visit"] }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
pedantic = { level = "warn", priority = -1 }
|
||||
|
|
|
@ -2,7 +2,7 @@ use cfg::Config;
|
|||
use changes::{JsChangeResult, JsChanges};
|
||||
use oxc::{
|
||||
allocator::Allocator,
|
||||
ast::Visit,
|
||||
ast_visit::Visit,
|
||||
diagnostics::OxcDiagnostic,
|
||||
parser::{ParseOptions, Parser},
|
||||
span::SourceType,
|
||||
|
@ -47,9 +47,10 @@ where
|
|||
.with_standard(true);
|
||||
let ret = Parser::new(&allocator, js, source_type)
|
||||
.with_options(ParseOptions {
|
||||
parse_regular_expression: false, // default
|
||||
parse_regular_expression: false,
|
||||
allow_v8_intrinsics: true,
|
||||
allow_return_outside_function: true,
|
||||
preserve_parens: true, // default
|
||||
preserve_parens: true,
|
||||
})
|
||||
.parse();
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
use oxc::{
|
||||
ast::{
|
||||
ast::{
|
||||
AssignmentExpression, AssignmentTarget, CallExpression, DebuggerStatement,
|
||||
ExportAllDeclaration, ExportNamedDeclaration, Expression, ForInStatement,
|
||||
ForOfStatement, FunctionBody, IdentifierReference, ImportDeclaration, ImportExpression,
|
||||
MemberExpression, MetaProperty, NewExpression, ObjectExpression, ObjectPropertyKind,
|
||||
ReturnStatement, ThisExpression, UnaryExpression, UnaryOperator, UpdateExpression,
|
||||
},
|
||||
visit::walk,
|
||||
Visit,
|
||||
ast::ast::{
|
||||
AssignmentExpression, AssignmentTarget, CallExpression, DebuggerStatement,
|
||||
ExportAllDeclaration, ExportNamedDeclaration, Expression, ForInStatement, ForOfStatement,
|
||||
FunctionBody, IdentifierReference, ImportDeclaration, ImportExpression, MemberExpression,
|
||||
MetaProperty, NewExpression, ObjectExpression, ObjectPropertyKind, ReturnStatement,
|
||||
ThisExpression, UnaryExpression, UnaryOperator, UpdateExpression,
|
||||
},
|
||||
ast_visit::{walk, Visit},
|
||||
span::{Atom, GetSpan, Span},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue