Wenyan Compiler
TODO
- Tokenize
- Parsing
- Importing
- Macro
- Better error messaging
- Render
- Examples & Stdlib testing
- Romanize
- Tree Shaking
- Execute for Viewer
A WIP wenyan compiler rewritten in TypeScipt and support AST.
Home Page: https://wyo.netlify.app/
Wenyan Compiler
This is a rewrite of wenyan-lang parser, with AST and source map support.
Note this is very working in progress. You will definitely face some glitches and bugs.
You can try it online: https://wyo.netlify.com
Written in Typescript, tokens and AST are well-typed.
Source location supported
Macro expanding, importing, tokenizing finished in a single turn - Should be faster
Tree shaking will be very straightforward to implement
try..catch
for example)I am glad to tell you the overhaul now compiles most of the scripts correctly(the basic examples, draw_trees). :)
However, while I am doing compatibility testing, I found out this line in 算經
In the current compiler, it will compile to
const _ans28 = 引 + 1;
const _ans29 = 基;
const _ans30 = 實;
const _ans31 = 合(_ans29)(_ans30);
const _ans32 = 造表列(_ans28)(_ans31);
I would say it make sense in some aspect, but it's hard to read and understand without having good knowledge about the compiler internal mechanisms. Which I think should not be advised.
I would suggest changing it to this
The new compiler does not maintain a "drifting" answers list (i forget what's its name in the code), instead, it makes the relationship of variables static during AST generation. (and there is no need for 噫
as well). So I am wondering if we should drop this "non-intuitive" mechanism in the new compiler? Or if there is any reason to have this mechanism please let me know. :)
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.