7.8kb
packages/mints
: tiny typescript compilerpackages/pargen
: parser generatorpackages/pargen-tokenized
: parser generator for tokens (mints use this)packages/playground
: mints web playground
Demo https://mints-playground.netlify.app/
MIT
lightweight typescript compiler
7.8kb
packages/mints
: tiny typescript compilerpackages/pargen
: parser generatorpackages/pargen-tokenized
: parser generator for tokens (mints use this)packages/playground
: mints web playgroundDemo https://mints-playground.netlify.app/
MIT
enum Keys {
A = "Aaa",
}
console.log(`Keys.A: ${Keys.A}`);
console.log(`Keys.Aaa: ${Keys.Aaa}`);
const Keys={A:"Aaa","Aaa":"A",};console.log(`Keys.A: ${Keys.A}`);console.log(`Keys.Aaa: ${Keys.Aaa}`);
console output
Keys.A: Aaa
Keys.Aaa: A
"use strict";
var Keys;
(function (Keys) {
Keys["A"] = "Aaa";
})(Keys || (Keys = {}));
console.log(`Keys.A: ${Keys.A}`);
console.log(`Keys.Aaa: ${Keys.Aaa}`);
console output
Keys.A: Aaa
Keys.Aaa: undefined
Just wondering, what did you build this for?
I went looking for a tiny TS compiler that would be small and fast enough to run in the browser - perhaps in a service worker.
Is that what you're after as well?
I wonder, esbuild being the fastest thing out there, would it be possible to pull just the parser and transformer from it's libraries, build a WASM module using tinygo, and get something very fast and small?
With those compile times, and if it runs on a separate thread from the UI thread (in a service worker) it might not actually impact load times substantially.
You might not need to write an entirely new parser. Seems like a lot of work. So much hard work went into esbuild already, and expect it might be both small and fast if built with tinygo, as the parser itself is hand written and small.
What do you think?
I saw a parse failure, so I am reporting it.
If there is a !==
or !=
in the code, the output will be incorrect.
!==
input
if(hoge !== null){
return 0;
}
output
if(hoge == null){
return 0;
}
!=
input
if(hoge != null){
return 0;
}
output
if(hoge = null){
return 0;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.