All Projects → buehler → node-typescript-parser

buehler / node-typescript-parser

Licence: MIT License
Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-typescript-parser

Uaiso
A multi-language parsing infrastructure with an unified AST
Stars: ✭ 86 (-28.93%)
Mutual labels:  parsing, ast
Down
Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark.
Stars: ✭ 1,895 (+1466.12%)
Mutual labels:  parsing, ast
Libdparse
Library for lexing and parsing D source code
Stars: ✭ 91 (-24.79%)
Mutual labels:  parsing, ast
Estree
The ESTree Spec
Stars: ✭ 3,867 (+3095.87%)
Mutual labels:  parsing, ast
tree-hugger
A light-weight, extendable, high level, universal code parser built on top of tree-sitter
Stars: ✭ 96 (-20.66%)
Mutual labels:  parsing, ast
Meriyah
A 100% compliant, self-hosted javascript parser - https://meriyah.github.io/meriyah
Stars: ✭ 690 (+470.25%)
Mutual labels:  parsing, ast
Yacep
yet another csharp expression parser
Stars: ✭ 107 (-11.57%)
Mutual labels:  parsing, ast
Graphql Go Tools
Tools to write high performance GraphQL applications using Go/Golang.
Stars: ✭ 96 (-20.66%)
Mutual labels:  parsing, ast
markright
A customizable markdown parser in Elixir: pure pattern matching.
Stars: ✭ 14 (-88.43%)
Mutual labels:  parsing, ast
codeparser
Parse Wolfram Language source code as abstract syntax trees (ASTs) or concrete syntax trees (CSTs)
Stars: ✭ 84 (-30.58%)
Mutual labels:  parsing, ast
inmemantlr
ANTLR as a libray for JVM based languages
Stars: ✭ 87 (-28.1%)
Mutual labels:  parsing, ast
kataw
An 100% spec compliant ES2022 JavaScript toolchain
Stars: ✭ 303 (+150.41%)
Mutual labels:  parsing, ast
hxjsonast
Parse JSON into position-aware AST with Haxe!
Stars: ✭ 28 (-76.86%)
Mutual labels:  parsing, ast
Esprima
ECMAScript parsing infrastructure for multipurpose analysis
Stars: ✭ 6,391 (+5181.82%)
Mutual labels:  parsing, ast
Escaya
An blazing fast 100% spec compliant, incremental javascript parser written in Typescript
Stars: ✭ 217 (+79.34%)
Mutual labels:  parsing, ast
cppcombinator
parser combinator and AST generator in c++17
Stars: ✭ 20 (-83.47%)
Mutual labels:  parsing, ast
kolasu
Kotlin Language Support – AST Library
Stars: ✭ 45 (-62.81%)
Mutual labels:  parsing, ast
babel-codemod-example
An example of how to use babel as a codemod
Stars: ✭ 24 (-80.17%)
Mutual labels:  ast
rector-laravel
Rector upgrades rules for Laravel
Stars: ✭ 75 (-38.02%)
Mutual labels:  ast
loquat
Monadic parser combinators for JavaScript / TypeScript
Stars: ✭ 47 (-61.16%)
Mutual labels:  parsing

node typescript parser

This package is a TypeScript and ECMAScript parser. It uses the underlying typescript parser to generate a more or less human readable AST out of .js or .ts files.

Build Status Build Status Windows npm codecov semantic-release Greenkeeper badge Gitter

How to use

After you install the package via:

NPM

View Source Docs

You can use the parser with:

const parser = new TypescriptParser();

// either:
const parsed = await parser.parseSource(/* typescript source code as string */);

// or a filepath
const parsed = await parser.parseFile('/user/myfile.ts', 'workspace root');

You can also parse multiple files at ones.

To use the declaration index (which is basically a list of symbols for your files) instantiate an index first and throw him some files.

After the parsing is done, you'll get an index with resolved exports and declarations.

Keep in mind, that the index'll only contain exported declarations.

Changelog

The changelog is generated by semantic release and is located under the release section.

Licence

This software is licenced under the MIT licence.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].