2 ms·
Maybe interesting for a comparison: 21 years ago I wrote my own tiny demo compiler in JS, much inspired by Niklaus Wirth. https://www.masswerk.at/demospace/eal
by masswerk 7y ago
Maybe interesting for a comparison: 21 years ago I wrote my own tiny demo compiler in JS, much inspired by Niklaus Wirth.
https://www.masswerk.at/demospace/eal/eal.htm https://www.masswerk.at/demospace/eal/eal.htm
See the page source for the code. (Probably fun, old syntax both for HTML and JS, pre-ECMA JavaScript [meaning, the semicolon isn't a delimiter, but a separator], even the indentation style is outdated. Mind that back then, even the support of JS object literals wasn't guaranteed.)
Syntax, etc: https://www.masswerk.at/demospace/eal/syntax.htm https://www.masswerk.at/demospace/eal/syntax.htm
Byte code reference: https://www.masswerk.at/demospace/eal/pcode.htm https://www.masswerk.at/demospace/eal/pcode.htm