question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate JavaScript runtime to TypeScript

See original GitHub issue

The JavaScript ANTLR4 runtime is getting to a size where it’s difficult to maintain in JavaScript. (One data point on this is that JavaScript > 10 KLOC effectively becomes read-only and fixing bugs becomes difficult.) One possible approach to mitigating this would be to migrate the codebase to the TypeScript language (a superset of JavaScript that adds static type checking and modern JavaScript constructs while transpiring into plain JavaScript.) The tools support for TypeScript is good and getting stronger.

I’ve made a couple of test migration experiments, and think I’m ready to do this for real. I’ve already found a number of bugs in the runtime through static type checking. A couple of questions before I too far into it?

  • Would this get support from the ANTLR4 community? Its not a one-man effort. Any volunteers?
  • After several experiments, I think it probably should be made a replacement for the existing JavaScript runtime. I think this will best allow comparison of the original and generated .js file versions. Sound OK?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:19
  • Comments:31 (19 by maintainers)

github_iconTop GitHub Comments

6reactions
sharwellcommented, Nov 26, 2018

I submitted several pull requests that should resolve the majority of the feature gap remaining in tunnelvisionlabs/antlr4ts. I still need to make improvements to the distribution strategy (reduce the time it takes to get updates published to npmjs), but overall it seems to be getting to a good state.

2reactions
ieugencommented, Mar 15, 2020

Any chance of adding links on the antlr website to support external projects that implement antlr for other languages or promote the upstream of those projects to antrl organization?

I think the projects would benefit from some marketing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Migrating from JavaScript - TypeScript
Converting a JavaScript codebase over to TypeScript is, while somewhat tedious, usually not challenging. In this tutorial, we're going to look at how...
Read more >
How to Migrate Application From JavaScript to TypeScript
Start by adding TypeScript to your build pipeline. Then migrate each code file one-by-one.
Read more >
ts-migrate: A Tool for Migrating to TypeScript at Scale - Medium
Let's walk through the main steps needed to migrate a project from JavaScript to TypeScript and how those steps are implemented: 1) The...
Read more >
A simple guide for migrating from JavaScript to TypeScript
This article shows you how to easily migrate a React component from JavaScript to TypeScript to improve your project.
Read more >
8 Steps to Migrating from JavaScript to TypeScript | Blog
Prepare Yourself · Rename Files · Fix Compiling Errors · Fix Test Cases · Refactor Code · Fix Minification · Auto-Generate Google Closure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found