oxc/crates
Tzvi Melamed 27681951e1
feat(oxc_semantic): Improve sample visualization (#2251)
1. add a `test.js` file to the project root:

```js
class A extends B {
  constructor() {
    try {
      super();
    } finally {
      this.a;
    }
  }
}
```

2. run:

```bash
$ cargo run -p oxc_semantic --example simple
   Compiling oxc_semantic v0.5.0 (/home/tzvipm/src/github.com/tzvipm/oxc/crates/oxc_semantic)
    Finished dev [unoptimized + debuginfo] target(s) in 32.07s
     Running `target/debug/examples/simple`
Wrote AST to: test.ast.txt
Wrote CFG blocks to: test.cfg.txt
Wrote CFG dot diagram to: test.dot
```

3. resulting graph from .dot file:


![image](https://github.com/TzviPM/oxc/assets/1950680/7163deaa-ab75-4bed-a093-946e2d6d2206)
2024-02-01 12:55:56 +00:00
..
oxc feat(ast): TypeScript definition for wasm target (#2158) 2024-01-30 15:43:03 +08:00
oxc_allocator docs(allocator): document behaviour of Box 2024-01-29 21:34:45 +08:00
oxc_ast feat(ast): remove expression property from Function (#2247) 2024-02-01 15:23:27 +08:00
oxc_cli feat(cli): add --version (#2182) 2024-01-26 19:13:17 +08:00
oxc_codegen feat(codegen): change back to read raw (#2222) 2024-01-31 12:17:52 +08:00
oxc_diagnostics Better report source line and col for multiline annotations (#2242) 2024-02-01 11:37:28 +08:00
oxc_index Publish crates v0.5.0 2024-01-12 23:33:47 +08:00
oxc_js_regex Initialize JS Regex crates and def AST. (#1500) 2023-11-23 00:22:17 +08:00
oxc_language_server chore(deps): update cargo (#2191) 2024-01-29 11:38:47 +08:00
oxc_linter fix(oxc_semantic): proper traversal of try statements (#2250) 2024-02-01 20:46:38 +08:00
oxc_macros feat(linter): remove the --timings feature (#2049) 2024-01-16 14:21:04 +08:00
oxc_minifier feat(codegen): move string test to codegen (#2150) 2024-01-23 23:49:36 +08:00
oxc_parser feat(ast): remove expression property from Function (#2247) 2024-02-01 15:23:27 +08:00
oxc_prettier fix(codegen): print Directive original string (#2157) 2024-01-25 15:24:05 +08:00
oxc_semantic feat(oxc_semantic): Improve sample visualization (#2251) 2024-02-01 12:55:56 +00:00
oxc_span chore: omit warning for unused TS_APPEND_CONTENT 2024-02-01 14:07:40 +08:00
oxc_syntax chore: omit warning for unused TS_APPEND_CONTENT 2024-02-01 14:07:40 +08:00
oxc_transformer feat(ast): remove expression property from Function (#2247) 2024-02-01 15:23:27 +08:00
oxc_wasm feat(ast): remove serde skip for symbol_id and reference_id (#2220) 2024-01-30 21:03:05 +08:00