* move `visit` and `visit_mut` modules to a super module called `visit`
* add `walk_mut` module containing walk functions
* update `enter_node` and `leave_node` events to not pass a reference in the `VisitMut` trait
* add `AstType`, a non-referencing version of `AstKind` to use with `VisitMut` trait
* update the `VisitMut` trait's usages.
This will close#2745,
In this PR I attempt to fix this issue using a combination of ideas
discussed in the issue mentioned above, I've created this early draft so
people can pitch in if there is something I should consider doing.
The first goal of this PR is to resolve the issue with the possible
illegal references, As a result of my approach it would also end up with
a bunch of walk_* and walk_*_mut functions to help with the abstraction.
I want to eliminate enter_node and leave_node functions, but I still
haven't started working on it since I first want to familiarize myself
with all of its usage throughout the project. I'm hesitating to do it at
the moment, When we want to do this it would require quite a bit of
refactoring so we should make sure it is probably going to work and end
up being a better implementation.
Unlike on other OS, on Windows there is no wildcard expansion/globbing
by the shell. Instead the application has to handle this. Therefore I
used the `glob` package to handle wildcards on Windows.
I also had to make the parent directory check more strict due to the
glob package resolving `..` in the middle of the path as well.
This closes#2695.
Export `SourcemapVisualizer` from codegen, it will be used oxc and
rolldown sourcemap test, so it support multiply source print, it will
using sourcemap `sourcesContent` as original source.
Rule detail:
https://eslint.org/docs/latest/rules/no-template-curly-in-string
At first I implemented it with regex, but I think you are trying to
avoid it for performance reasons, so I did it by searching for the
chars.
I had some problems showing the span in the case of 'Hello, ${{foo:
"bar"}.foo}' I think it turned out more or less well, however, if you
think it can be done in another way I am willing to do it .
---------
Co-authored-by: j.buendia <j.buendia>
As talked here
https://github.com/oxc-project/oxc/pull/2746#discussion_r1528145418
errors in guard_for_in could be improved so I attempted to improve it.
If anyone have a suggestion for the span element positions say me!
---------
Co-authored-by: j.buendia <j.buendia>
Rule detail: https://eslint.org/docs/latest/rules/max-params
Maybe I can add function name, I was searching for it, but I don't know
how to get it.
---------
Co-authored-by: j.buendia <j.buendia>
Speed up lexing JSX identifier continuations (i.e. after `-`), by
searching for end of identifier byte-by-byte.
Change does not register on benchmarks, only because benchmarks don't
contain any `<Foo-Bar />` identifiers, so don't exercise this code path.
Rule detail: https://eslint.org/docs/latest/rules/no-continue
It's my first time in Rust, so I have a lot to learn from you. Maybe I
do some silly mistakes. Sorry!
---------
Co-authored-by: j.buendia <j.buendia>