Wenyan-rs
A bytecode interpreter for Wenyan-lang.
Usage
Examples
Output:
This project are still work in progress, many features are not implemented yet. You can see more supported examples in examples folder.
Differences
The Online IDE has many friendly enhances, some of my rules may be more strict for ease of implementation.
Variable need to be wrapped with single quote.
Disable partially define variables.
Has implicit block scope.
Output vs Online IDE:
-6
-6
+6
+15
Boolean algebra statement always gets boolean.
Output vs Online IDE:
-5
-6
+true
+true
Treats single data as expression and will be pushed into stack.
Output vs Online IDE
+5
+黃河流水鳴濺濺
Treats '也' as kind of whitespace, you can use it to make code more readable, but can't use it as close of block.
After 夫「「世界,你好」」書之, The stack will be:
)
When function 你好 returns, the stack will be:
)
Take advantage of our own virtual machine, It has ability to report more kind of runtime errors.
Output:
Future Work
There are still many features not implemented! Part of them are listed in this issue.