Package Exports
- kataw
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (kataw) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Kataw
An insane fast Javascript toolchain.
WIP
Kataw is a javascript toolchain with high focus on performance, and it's main goal is to unify functionality that has previously been separate tools.
It's core is an CST parser that emits an ECMAScript friendly CST and allows you to
parse ECMAScript® 2022 (ECMA-262 12th Edition) language specification.
CST parser features
Error recovery by default (like Acorn loose), but it reconstruct the CST tree correctly
Optional error reporting (require a callback as the parsers 3rd argument)
Dynamic error, hint and warning diagnostics (depends on the context you are parsing in)
Public API methods to extract info from the CST nodes
100% correct comment extraction and attachment algorithm
Can parse types and type annotations (Kataw has it's own type system)
Can be used in any editors
Scalable
Performance
Recovery mode
The recovery mode is enabled by default. See the readme in the parser folder for further details.
Note This must not to be confused with Acorn loose because Kataw's error recovery mode reconstruct the CST 100% and makes sure the output
conforms with the ECMA specs. In Acron you can expect that a try statement become a while statement during error recovery or parts of the
ESTree AST is missing.
This is what Kataw can do:
parse Javascript
typechecking (like Typescript and Flow)
transform current ECMA code to older ECMA versions (like Babel)
global API to perform AST manipulation and tree walkers
Pretty printing (like Prettier)
Grammar checker
Linting (like ESLint)
Minify (Like Terser)
Performance
Performance is all about the memory and GC pressure, and it's commonly known that the ESTree and Babel AST is the real perf killer for parsers in Javascript.
Kataw work around this with it's own AST that is optimized for performance.

Current state
Only the Kataw CST parser, walker, AST manipulation through global API is available as of now.
Soon as this code is in a "stable state" I will add the rest of the tools
Future
A "hook system" for adding additional rules for the linter and the grammar checker will be published.
Hooks to support experimental syntax and ECMA proposals in an sandboxed envirnonment