mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-29 17:35:02 +08:00
For JavaScript we offer argument hints by parsing the function's string representation, which was so far done via the FormatterWorker and utilizing acorn. With CodeMirror 6 (and lezer-parser) we can now do this without having to offload this to acorn and can just throw the function's string representation into the lezer parser and extract the parameters from its syntax tree. The motivation here is to eventually remove the dependency on acorn and CodeMirror 5 alltogether, reducing the number of parsers that we need to keep in sync to just two (CodeMirror 6 and V8). Bug: chromium:1215072 Change-Id: I7e7c521002dec9151a31d841b66f0fd3b1838cf5 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4104622 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>