diff --git a/Cargo.lock b/Cargo.lock index 36597cb..24c260a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -288,6 +288,12 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ "allocator-api2", ] @@ -515,9 +521,9 @@ checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" [[package]] name = "oxc-miette" -version = "2.7.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a7ba54c704edefead1f44e9ef09c43e5cfae666bdc33516b066011f0e6ebf7" +checksum = "b776084bf11ad750806cb63f9ed2606a12ab374cf458f36a7731eba1f5d753fc" dependencies = [ "cfg-if", "owo-colors", @@ -530,9 +536,9 @@ dependencies = [ [[package]] name = "oxc-miette-derive" -version = "2.7.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4faecb54d0971f948fbc1918df69b26007e6f279a204793669542e1e8b75eb3" +checksum = "66e0bafc397eee2f94c5bf89bb5a82ba6d522d1b79e2924c8169f053febb433f" dependencies = [ "proc-macro2", "quote", @@ -541,21 +547,21 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b44277218c002c09167474648a478d3d29a29095ef8950ec9f1fac016c62d7" +checksum = "b34ec71e68e73a0ed7d929e58ab2bb4f58752dea944c08f14ccc3b8272c77946" dependencies = [ "allocator-api2", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "oxc_data_structures", "rustc-hash", ] [[package]] name = "oxc_ast" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4222e4e7a1ab01b2a20420a5a65798377a748ea37ee7ece4d7a6b733f86eb61" +checksum = "fa406c62bb247767a6a051be6ac3be7db6c4f818129ccae570da6ee9eb96ead0" dependencies = [ "bitflags", "oxc_allocator", @@ -565,14 +571,15 @@ dependencies = [ "oxc_estree", "oxc_regular_expression", "oxc_span", + "oxc_str", "oxc_syntax", ] [[package]] name = "oxc_ast_macros" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e65a38ae589e284dd45a85008024f04aa680e9ddf1321c163cf7f187c805e91" +checksum = "3706e193b659865e03155a44e443f0447abf6789f9a3eb436ae10e557afab899" dependencies = [ "phf", "proc-macro2", @@ -582,15 +589,15 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f53bed71cad192596aee8f87f6d6bc2a38a4f898255a69b1d41da1968b9b2c6f" +checksum = "fde9ca13ef89018fb4c18502cefb9668baac6066905d27a914c29fb5fae1c8ac" [[package]] name = "oxc_diagnostics" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a2d2491c0a1ea29a83abe645424f85c64b5c825f60e5304a453e4314a8b6d88" +checksum = "d2cbafa6cc3c38d72e35cd9337a38a4558e9fee4521fa5cabe321b90519e80aa" dependencies = [ "cow-utils", "oxc-miette", @@ -599,9 +606,9 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b23b64fa8c4a84b1406de383c4666366c9f54ffb9cb11a63b8d7433950460a" +checksum = "f55408e4f458ec4b9cd842f67364e9395b28bdf2201c7755ed04d6707c1084ea" dependencies = [ "cow-utils", "num-bigint", @@ -615,15 +622,15 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47515ead44bc8beec1ae1514f10ecca63cde043da167c0395dc914f098ea5d2" +checksum = "0b6c062d52b9ff15d118b87679bdd0a05c43599c1d55fd1cab280da1cc822858" [[package]] name = "oxc_index" -version = "4.1.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3e6120999627ec9703025eab7c9f410ebb7e95557632a8902ca48210416c2b" +checksum = "191884bee6c3744909a51acc7d78d4ae370d817b25875b10642f632327b6296e" dependencies = [ "nonmax", "serde", @@ -631,9 +638,9 @@ dependencies = [ [[package]] name = "oxc_parser" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3278d4f34d01cdaf85a2391d7b12daba1d95c20c1ff2ac9316d3c28f36353e4e" +checksum = "6efc796fc0c65a2a6bd40984b65b1052b5550b017af303f02b08794e304c14c8" dependencies = [ "bitflags", "cow-utils", @@ -647,6 +654,7 @@ dependencies = [ "oxc_ecmascript", "oxc_regular_expression", "oxc_span", + "oxc_str", "oxc_syntax", "rustc-hash", "seq-macro", @@ -654,15 +662,16 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d680252672b22c24abbaf6e401eace0be9f53072a03411936204625ff349d0" +checksum = "e533f1345534dceaee6c2c7102e5f3d2e7466269199eca9abeb871e02a7496a4" dependencies = [ "bitflags", "oxc_allocator", "oxc_ast_macros", "oxc_diagnostics", "oxc_span", + "oxc_str", "phf", "rustc-hash", "unicode-id-start", @@ -670,9 +679,9 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb1bd62de89fb0c646bfb053b72370750fab43a84ebe09ad97cfa020712314" +checksum = "5a5245fa99a7c9405d57e2d9666afc9fd01ac644e37aff1cb3e1cedd50c17915" dependencies = [ "compact_str", "oxc-miette", @@ -684,21 +693,21 @@ dependencies = [ [[package]] name = "oxc_str" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65cbfb06ecbae07e0da931815b6b03ade886d016302c400bda7dc0a2f600d3" +checksum = "53c61444d5681ce805fbbb5dc0498d980685a4c6a82dd57c2e17ff948041c1fb" dependencies = [ "compact_str", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "oxc_allocator", "oxc_estree", ] [[package]] name = "oxc_syntax" -version = "0.117.0" +version = "0.137.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f1617f0aa890517fb61ffa1d2d73a8497aca52e84ef6f027fad1e93250eccc" +checksum = "296b94ecc1235a2b5ea2a47412d4bc573b7a25a93132a1a2f49c617d85b58995" dependencies = [ "bitflags", "cow-utils", @@ -709,6 +718,7 @@ dependencies = [ "oxc_estree", "oxc_index", "oxc_span", + "oxc_str", "phf", "unicode-id-start", ] diff --git a/Cargo.toml b/Cargo.toml index 07bf346..745d51f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,11 +18,11 @@ repository = "https://github.com/TheUncharted/zapcode" [workspace.dependencies] # Parser -oxc_parser = "0.117.0" -oxc_ast = "0.117.0" -oxc_allocator = "0.117.0" -oxc_span = "0.117.0" -oxc_syntax = "0.117.0" +oxc_parser = "0.137.0" +oxc_ast = "0.137.0" +oxc_allocator = "0.137.0" +oxc_span = "0.137.0" +oxc_syntax = "0.137.0" # Serialization serde = { version = "1.0.228", features = ["derive", "rc"] } diff --git a/crates/zapcode-core/src/parser/mod.rs b/crates/zapcode-core/src/parser/mod.rs index fb26274..a203883 100644 --- a/crates/zapcode-core/src/parser/mod.rs +++ b/crates/zapcode-core/src/parser/mod.rs @@ -17,8 +17,8 @@ pub fn parse(source: &str) -> Result { let source_type = SourceType::tsx(); let ret = Parser::new(&allocator, &source, source_type).parse(); - if !ret.errors.is_empty() { - let msgs: Vec = ret.errors.iter().map(|e| e.to_string()).collect(); + if !ret.diagnostics.is_empty() { + let msgs: Vec = ret.diagnostics.iter().map(|e| e.to_string()).collect(); return Err(ZapcodeError::ParseError(msgs.join("\n"))); }